0

I could build my app yesterday. But today I cannot and I don't know what the problem is...

The ERROR I get is:

An error occurred while building the application. Verify your build assets are correct and try again.

Build Log:

The App ID is "com.my.App"
The App Name is "App"
Crosswalk Version: Stable (7.36.154.14)
Plugin installed: File (org.apache.cordova.file)
Plugin installed: Pushwoosh (https://github.com/Pushwoosh/pushwoosh- ... plugin.git)
Plugin installed: myAdmob (https://github.com/floatinghotpot/cordo ... -admob.git)
Plugin installed: myLocalNotification (de.appplant.cordova.plugin.local-notification)
Plugin installed: Accelerometer (org.apache.cordova.device-motion)
Plugin installed: Camera (org.apache.cordova.camera)
Plugin installed: Capture (org.apache.cordova.media-capture)
Plugin installed: Compass (org.apache.cordova.device-orientation)
Plugin installed: Connection (org.apache.cordova.network-information)
Plugin installed: Contacts (org.apache.cordova.contacts)
Plugin installed: Device (org.apache.cordova.device)
Plugin installed: Events (battery status) (org.apache.cordova.battery-status)
Plugin installed: Geolocation (org.apache.cordova.geolocation)
Plugin installed: Globalization (org.apache.cordova.globalization)
Plugin installed: In App Browser (org.apache.cordova.inappbrowser)
Plugin installed: Media (org.apache.cordova.media)
Plugin installed: Dialogs (notification) (org.apache.cordova.dialogs)
Plugin installed: Vibration (notification) (org.apache.cordova.vibration)
Plugin installed: SplashScreen (org.apache.cordova.splashscreen)
Plugin installed: App Security API (com.intel.security)
Plugin installed: Audio (intel.xdk.audio)
Plugin installed: Cache (intel.xdk.cache)
Plugin installed: Camera (intel.xdk.camera)
Plugin installed: Contacts (intel.xdk.contacts)
Plugin installed: Device (intel.xdk.device)
Plugin installed: File (intel.xdk.file)
Plugin installed: Notification (intel.xdk.notification)
Plugin installed: Player (intel.xdk.player)
Plugin installed: Dolby* Audio API (https://github.com/DolbyDev/Dolby-Audio ... or-Cordova)
Plugin installed: File Transfer (org.apache.cordova.file-transfer)
Plugin installed: StatusBar (org.apache.cordova.statusbar)

You can view the log of the Android build

Buildfile: .../appname/build.xml

-check-env:
 [checkenv] Android SDK Tools Revision 23.0.2
 [checkenv] Installed at ...

-setup:
     [echo] Project Name: appname
  [gettype] Project Type: Application

-pre-clean:

clean:

BUILD SUCCESSFUL
Total time: 0 seconds
Buildfile: .../appname/build.xml

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
     [echo] proguard.config is ${proguard.config}

-pre-build:

-check-env:
 [checkenv] Android SDK Tools Revision 23.0.2
 [checkenv] Installed at ...

-setup:
     [echo] Project Name: appname
  [gettype] Project Type: Application

-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
     [echo] Resolving Build Target for appname...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: .../appname/bin
    [mkdir] Created dir: .../appname/bin/res
    [mkdir] Created dir: .../appname/bin/rsObj
    [mkdir] Created dir: .../appname/bin/rsLibs
    [mkdir] Created dir: .../appname/gen
    [mkdir] Created dir: .../appname/bin/classes
    [mkdir] Created dir: .../appname/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for appname...
[dependency] Library dependencies:
[dependency] 
[dependency] ------------------
[dependency] Ordered libraries:
[dependency] 
[dependency] ------------------

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [aapt] nothing matches overlay file icon.png, for flavor ,,,,,,,,,,,,,,,,,,,
     [aapt] nothing matches overlay file icon.png, for flavor ,,,,,,,,,,,,xhdpi,,,,,,,
     [aapt] nothing matches overlay file splash.png, for flavor ,,,,,,,,,land,,,hdpi,,,,,,,
     [aapt] nothing matches overlay file splash.png, for flavor ,,,,,,,,,land,,,ldpi,,,,,,,
     [aapt] nothing matches overlay file splash.png, for flavor ,,,,,,,,,land,,,mdpi,,,,,,,
     [aapt] nothing matches overlay file splash.png, for flavor ,,,,,,,,,land,,,xhdpi,,,,,,,
     [aapt] nothing matches overlay file splash.png, for flavor ,,,,,,,,,port,,,hdpi,,,,,,,
     [aapt] nothing matches overlay file splash.png, for flavor ,,,,,,,,,port,,,ldpi,,,,,,,
     [aapt] nothing matches overlay file splash.png, for flavor ,,,,,,,,,port,,,mdpi,,,,,,,
     [aapt] nothing matches overlay file splash.png, for flavor ,,,,,,,,,port,,,xhdpi,,,,,,,
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 63 source files to .../appname/bin/classes
    [javac] warning: com/google/android/gms/ads/AdListener.class(com/google/android/gms/ads:AdListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/android/gms/ads/AdRequest.class(com/google/android/gms/ads:AdRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/android/gms/ads/AdSize.class(com/google/android/gms/ads:AdSize.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/android/gms/ads/AdView.class(com/google/android/gms/ads:AdView.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/android/gms/ads/InterstitialAd.class(com/google/android/gms/ads:InterstitialAd.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/android/gms/ads/mediation/admob/AdMobExtras.class(com/google/android/gms/ads/mediation/admob:AdMobExtras.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/android/gms/common/ConnectionResult.class(com/google/android/gms/common:ConnectionResult.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/android/gms/common/GooglePlayServicesUtil.class(com/google/android/gms/common:GooglePlayServicesUtil.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/android/gms/ads/AdRequest$Builder.class(com/google/android/gms/ads:AdRequest$Builder.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/android/gms/ads/mediation/NetworkExtras.class(com/google/android/gms/ads/mediation:NetworkExtras.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] warning: com/google/ads/mediation/NetworkExtras.class(com/google/ads/mediation:NetworkExtras.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    [javac] It is recommended that the compiler be upgraded.
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 11 warnings

-post-compile:

-obfuscate:

-dex:
      [dex] input: .../appname/bin/classes
      [dex] input: .../framework/bin/classes.jar
      [dex] input: .../framework/xwalk_core_library/bin/classes.jar
      [dex] input: .../appname/com.google.playservices/google-play-services_lib/bin/classes.jar
      [dex] input: .../appname/libs/dolby_audio_processing.jar
      [dex] input: .../appname/libs/com.google.zxing.client.android.captureactivity.jar
      [dex] input: .../appname/com.google.playservices/google-play-services_lib/libs/google-play-services.jar
      [dex] input: .../framework/xwalk_core_library/libs/xwalk_core_library_java.jar
      [dex] input: .../appname/libs/Pushwoosh.jar
      [dex] Pre-Dexing .../framework/bin/classes.jar -> classes-c888b94ddba97b0e25b22525db35b6cc.jar
      [dex] Pre-Dexing .../framework/xwalk_core_library/bin/classes.jar -> classes-87b66cb50b13fe1ffdecf5ef05c79ce8.jar
      [dex] Pre-Dexing .../appname/libs/dolby_audio_processing.jar -> dolby_audio_processing-721546cd6baac89d8439fad4e1b2a961.jar
      [dex] Pre-Dexing .../appname/libs/com.google.zxing.client.android.captureactivity.jar -> com.google.zxing.client.android.captureactivity-7406fbf66dfb31f2544e7a8cf811691b.jar
      [dex] Pre-Dexing .../appname/com.google.playservices/google-play-services_lib/libs/google-play-services.jar -> google-play-services-bf5947c07197107dd868b3b9915d2dc1.jar
      [dex] Pre-Dexing .../framework/xwalk_core_library/libs/xwalk_core_library_java.jar -> xwalk_core_library_java-1aa58519e49aaf933d900f3c0be99fa5.jar
      [dex] Pre-Dexing .../appname/libs/Pushwoosh.jar -> Pushwoosh-fb05e2860f5f63773071342ca81e3b6d.jar
      [dex] Converting compiled files and external libraries into .../appname/bin/classes.dex...
       [dx] 
       [dx] UNEXPECTED TOP-LEVEL EXCEPTION:
       [dx] java.util.zip.ZipException: error in opening zip file
       [dx]  at java.util.zip.ZipFile.open(Native Method)
       [dx]  at java.util.zip.ZipFile.<init>(ZipFile.java:127)
       [dx]  at java.util.zip.ZipFile.<init>(ZipFile.java:143)
       [dx]  at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
       [dx]  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
       [dx]  at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
       [dx]  at com.android.dx.command.dexer.Main.processOne(Main.java:596)
       [dx]  at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
       [dx]  at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
       [dx]  at com.android.dx.command.dexer.Main.run(Main.java:230)
       [dx]  at com.android.dx.command.dexer.Main.main(Main.java:199)
       [dx]  at com.android.dx.command.Main.main(Main.java:103)
       [dx] 1 error; aborting

BUILD FAILED
.../tools/ant/build.xml:892: The following error occurred while executing this line:
.../tools/ant/build.xml:894: The following error occurred while executing this line:
.../tools/ant/build.xml:906: The following error occurred while executing this line:
.../tools/ant/build.xml:283: null returned: 1

Total time: 1 minute 13 seconds
Error code 1 for command: ant with args: release,-f,.../appname/build.xml

Can somebody help me, please? It would be great.

Gilles
  • 9,269
  • 4
  • 34
  • 53
  • Can you provide more information? Your build log doesn't show any errors or warning based on what you have shared above. – eashtianjr Nov 07 '14 at 00:21
  • Thank you for the answer. I could build but sometimes as now I cannot build no more... It is still the same code.. I added more info – Hungry2Learn Nov 07 '14 at 20:15

1 Answers1

1

It's fixed. Please re-build.

Root cause:

Intel XDK does not support library project, newly introduced in plugin (com.google.playservices@21.0.0).

<framework src="libs/google-play-services_lib" custom="true" />

You may ask, why the change of "com.google.playservices" will cause AdMob plugin fail?

The admob plugin was dependent on another plugin named "com.google.playservices", which adds google play services jar to project.

The "com.google.playservices@19.0.0" is a simple jar file, it worked quite well.

<source-file src="google-play-services.jar" target-dir="libs" />

But the "com.google.playservices@21.0.0" is using a new feature to include a whole library project.

<framework src="libs/google-play-services_lib" custom="true" />

It works quite well if build locally with Cordova CLI, but it will fail when build with Intel XDK.

To keep compatible with Intel XDK, the dependency of admob plugin is changed to "com.google.playservices@19.0.0", the simple jar file.

Now it works with Intel XDK again.

Raymond Xie
  • 1,486
  • 12
  • 20