我的Cordova应用程序已经构建好几周,然后突然构建失败了 - 我的目标是针对Android的VS Emulator,我的Cordova Tools有最新的更新。
1> ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
1> JAVA_HOME=C:\Program Files\Java\jdk1.8.0_11
1> Reading build config file: .. build.json
1> Running: ...\platforms\android\gradlew cdvBuildDebug -b ...\platforms\android\build.gradle - Dorg.gradle.daemon=true
1> :preBuild
1> :compileDebugNdk UP-TO-DATE
1> :preDebugBuild
1> :checkDebugManifest
1> :CordovaLib:compileLint
1> :CordovaLib:copyDebugLint UP-TO-DATE
1> :CordovaLib:mergeDebugProguardFiles UP-TO-DATE
1> :CordovaLib:preBuild
1> :CordovaLib:preDebugBuild
1> :CordovaLib:checkDebugManifest
1> :CordovaLib:prepareDebugDependencies
1> :CordovaLib:compileDebugAidl UP-TO-DATE
1> :CordovaLib:compileDebugRenderscript UP-TO-DATE
1> :CordovaLib:generateDebugBuildConfig UP-TO-DATE
1> :CordovaLib:generateDebugAssets UP-TO-DATE
1> :CordovaLib:mergeDebugAssets UP-TO-DATE
1> :CordovaLib:generateDebugResValues UP-TO-DATE
1> :CordovaLib:generateDebugResources UP-TO-DATE
1> :CordovaLib:packageDebugResources UP-TO-DATE
1> :CordovaLib:processDebugManifest UP-TO-DATE
1> :CordovaLib:processDebugResources UP-TO-DATE
1> :CordovaLib:generateDebugSources UP-TO-DATE
1> :CordovaLib:compileDebugJava UP-TO-DATE
1> :CordovaLib:processDebugJavaRes UP-TO-DATE
1> :CordovaLib:packageDebugJar UP-TO-DATE
1> :CordovaLib:compileDebugNdk UP-TO-DATE
1> :CordovaLib:packageDebugJniLibs UP-TO-DATE
1> :CordovaLib:packageDebugLocalJar UP-TO-DATE
1> :CordovaLib:packageDebugRenderscript UP-TO-DATE
1> :CordovaLib:bundleDebug UP-TO-DATE
1> :prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
1> :prepareDebugDependencies
1> :compileDebugAidl UP-TO-DATE
1> :compileDebugRenderscript UP-TO-DATE
1> :generateDebugBuildConfig UP-TO-DATE
1> :generateDebugAssets UP-TO-DATE
1> :mergeDebugAssets FAILED
1>
1> FAILURE: Build failed with an exception.
1>
1> * What went wrong:
1> Execution failed for task ':mergeDebugAssets'.
1> > java.lang.NullPointerException (no error message)
答案 0 :(得分:4)
我在尝试在获得此错误时在实际设备上运行,但对我来说解决方案只是干净利落。对我来说这是“干净的android --device”之后,我能够部署到我的设备而不会出现此错误。