Android的人行横道构建失败(XDK-app-Build)

时间:2014-11-05 09:18:59

标签: cordova intel-xdk crosswalk-runtime intel-xdk-contacts

我昨天可以构建我的应用程序。但今天我不能和我不知道问题是什么......

我得到的错误是

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

构建日志

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)

您可以查看Android版本的日志

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

是的,有人可以帮助我吗?这会很棒。

1 个答案:

答案 0 :(得分:1)

这是固定的。请重新构建。

根本原因:

英特尔XDK不支持插件中新引入的库项目(com.google.playservices@21.0.0)。

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

您可能会问,为什么更改“com.google.playservices”会导致AdMob插件失败?

admob插件依赖于另一个名为“com.google.playservices”的插件,该插件将google play服务jar添加到项目中。

“com.google.playservices@19.0.0”是一个简单的jar文件,效果很好。

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

但是“com.google.playservices@21.0.0”正在使用新功能来包含整个库项目。

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

如果使用Cordova CLI在本地构建,它可以很好地工作,但在使用Intel XDK构建时会失败。

为了与英特尔XDK保持兼容,admob插件的依赖关系更改为“com.google.playservices@19.0.0”,即简单的jar文件。

现在它再次与英特尔XDK配合使用。