0

I have upgraded my phonegap project to cordova 4.1.1 from cordova 3.5.1. And remove existing old version of splash screen plugin and add new version of it. And also added new plugin whitelist as well.

But now i have a problem when building APK from CLI command it gives following error. But when i import APK using eclipse it wont give error and outputs the APK correctly. Followings are the command that i have executed.

  1. cordova build android
  2. android update project -p platforms/android --subprojects
  3. ant clean release.

while 3rd command run following types of errors comes.

apache/cordova/splashscreen/SplashScreen.java:79: cannot find symbol
[javac] symbol  : variable preferences
[javac] location: class org.apache.cordova.splashscreen.SplashScreen
[javac]             String splashResource = preferences.getString("SplashScreen", "screen");

How to resolve this?

wildeyes
  • 6,767
  • 5
  • 19
  • 37
HiChKu
  • 41
  • 4
  • There is no ant in cordova 4.1.1, change your build to gradle. before upgrading your project first upgrade your node and then npm followed cordova this is the procedure – NGB Jul 12 '16 at 07:08
  • Thanks @NaveenBannikoppa. I did gradle build but the signed APK was not generated. Others (unsigned and unaligned) apks generated. how can i generate signed apk through gradle build? – HiChKu Jul 13 '16 at 04:00
  • Go through the whole doc http://stackoverflow.com/questions/26449512/how-to-create-signed-apk-file-using-cordova-command-line-interface http://ilee.co.uk/Sign-Releases-with-Cordova-Android/ – NGB Jul 13 '16 at 05:45
  • Follow this link http://stackoverflow.com/questions/30190745/signing-apk-file-in-cordova-v-5-0-cli-is-not-working – NGB Jul 13 '16 at 06:27

0 Answers0