0

After succesfully compiling with Phonegap version 3.1.0-0.15.0 and importing the project in Android Studio, I find myself unable to edit the App.class from cordova-3.1.0.jar, getting the following message:

"Sources not found." - with the options Search in Internet and Attach Sources. Both of which I already tried.

Also, all the classes from cordova-3.1.0.jar appear to be locked, and none is editable. I already checked for file permissions in Windows.

Note: I was following the instructions from phonegap - splash screen for Android app to add a splashscreen to my app.

Community
  • 1
  • 1
Peter Noble
  • 675
  • 10
  • 21

1 Answers1

1

You never change classes from a jar file.

What you need is change the source file of the activity class of your app, not a class from cordova.

If you named your app for example com.razvan.myapp, then in android studio you should find a file /src/com/razvan/myapp/MyApp.java containing a class MyApp that extends the class CordovaActivity.

It's the class MyApp (or whatever name you gave to your project) in MyApp.java that you should change to add your splashscreen.

That said, the instructions you are following for the splash screen are very old and relevant only for Phonegap older than version 2.2 or something like that. With phonegap 3 you should follow instructions from this page

QuickFix
  • 11,661
  • 2
  • 38
  • 50