weex run android 报错 unzipJacocoAgent

执行:

weex run android

报如下错误:

=> npm install&build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ios-deploy@^1.9.0 (node_modules/ios-deploy):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for ios-deploy@1.9.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN xxx@1.0.0 No repository field.

> xxx@1.0.0 build /home/scort/dev-app-demo
> webpack

Hash: 505f9f233e8649b2ca07e469c205c6fbf8d1a8fb
Version: webpack 2.4.1
Child
    Hash: 505f9f233e8649b2ca07
    Time: 2735ms
           Asset     Size  Chunks             Chunk Names
    index.web.js  5.47 kB       0  [emitted]  index
       [0] ./src/index.vue 1.44 kB {0} [built]
       [1] ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/index.vue 307 bytes {0} [built]
       [2] ./temp?entry=true 70 bytes {0} [built]
       [3] ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-3cee9da6!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/index.vue 382 bytes {0} [built]
       [4] ./~/css-loader/lib/css-base.js 1.46 kB {0} [built]
       [5] ./~/vue-loader/lib/component-normalizer.js 1.12 kB {0} [built]
       [6] ./~/vue-loader/lib/template-compiler.js?id=data-v-3cee9da6!./~/vue-loader/lib/selector.js?type=template&index=0!./src/index.vue 711 bytes {0} [built]
       [7] ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-3cee9da6!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/index.vue 1.33 kB {0} [built]
       [8] ./~/vue-style-loader/lib/addStylesClient.js 6.05 kB {0} [built]
       [9] ./~/vue-style-loader/lib/listToStyles.js 639 bytes {0} [built]
Child
    Hash: e469c205c6fbf8d1a8fb
    Time: 1641ms
       Asset     Size  Chunks             Chunk Names
    index.js  2.08 kB       0  [emitted]  index
       [0] ./~/weex-vue-loader/lib/script-loader.js!./~/babel-loader/lib!./~/weex-vue-loader/lib/selector.js?type=script&index=0!./src/index.vue 307 bytes {0} [built]
       [1] ./~/weex-vue-loader/lib/style-loader.js!./~/weex-vue-loader/lib/style-rewriter.js?id=data-v-4aa510bc!./~/weex-vue-loader/lib/selector.js?type=styles&index=0!./src/index.vue 307 bytes {0} [built]
       [2] ./~/weex-vue-loader/lib/template-compiler.js?id=data-v-4aa510bc!./~/weex-vue-loader/lib/selector.js?type=template&index=0!./src/index.vue 543 bytes {0} [built]
       [3] ./src/index.vue?entry=true 1.69 kB {0} [built]

 => Will start Android app
============build config============
AppId=>com.alibaba.weex
AppName=>WeexApp
SplashText=>Hello
Weex
WeexBundle=>index.js
if you want to change build config.please modify android.config.json
 => Building app ...
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:appframework:preBuild UP-TO-DATE
:appframework:preReleaseBuild UP-TO-DATE
:appframework:checkReleaseManifest
:appframework:preDebugAndroidTestBuild UP-TO-DATE
:appframework:preDebugBuild UP-TO-DATE
:appframework:preDebugUnitTestBuild UP-TO-DATE
:appframework:preReleaseUnitTestBuild UP-TO-DATE
:appframework:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:appframework:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:appframework:prepareComFacebookFrescoDrawee0100Library UP-TO-DATE
:appframework:prepareComFacebookFrescoFbcore0100Library UP-TO-DATE
:appframework:prepareComFacebookFrescoFresco0100Library UP-TO-DATE
:appframework:prepareComFacebookFrescoImagepipeline0100Library UP-TO-DATE
:appframework:prepareComFacebookFrescoImagepipelineBase0100Library UP-TO-DATE
:appframework:prepareComTaobaoAndroidWeex_sdk0100Library UP-TO-DATE
:appframework:prepareReleaseDependencies
:appframework:compileReleaseAidl UP-TO-DATE
:appframework:compileReleaseNdk UP-TO-DATE
:appframework:compileLint UP-TO-DATE
:appframework:copyReleaseLint UP-TO-DATE
:appframework:compileReleaseRenderscript UP-TO-DATE
:appframework:generateReleaseBuildConfig UP-TO-DATE
:appframework:generateReleaseResValues UP-TO-DATE
:appframework:generateReleaseResources UP-TO-DATE
:appframework:mergeReleaseResources UP-TO-DATE
:appframework:processReleaseManifest UP-TO-DATE
:appframework:processReleaseResources UP-TO-DATE
:appframework:generateReleaseSources UP-TO-DATE
:appframework:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:appframework:compileReleaseJavaWithJavac UP-TO-DATE
:appframework:extractReleaseAnnotations UP-TO-DATE
:appframework:mergeReleaseShaders UP-TO-DATE
:appframework:compileReleaseShaders UP-TO-DATE
:appframework:generateReleaseAssets UP-TO-DATE
:appframework:mergeReleaseAssets UP-TO-DATE
:appframework:mergeReleaseProguardFiles UP-TO-DATE
:appframework:packageReleaseRenderscript UP-TO-DATE
:appframework:packageReleaseResources UP-TO-DATE
:appframework:processReleaseJavaRes UP-TO-DATE
:appframework:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:appframework:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:appframework:mergeReleaseJniLibFolders UP-TO-DATE
:appframework:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:appframework:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:appframework:bundleRelease UP-TO-DATE
:weexplugin:preBuild UP-TO-DATE
:weexplugin:preReleaseBuild UP-TO-DATE
:weexplugin:checkReleaseManifest
:weexplugin:preDebugAndroidTestBuild UP-TO-DATE
:weexplugin:preDebugBuild UP-TO-DATE
:weexplugin:preDebugUnitTestBuild UP-TO-DATE
:weexplugin:preReleaseUnitTestBuild UP-TO-DATE
:weexplugin:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:weexplugin:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:weexplugin:prepareComTaobaoAndroidWeex_sdk0100Library UP-TO-DATE
:weexplugin:prepareReleaseDependencies
:weexplugin:compileReleaseAidl UP-TO-DATE
:weexplugin:compileReleaseNdk UP-TO-DATE
:weexplugin:compileLint UP-TO-DATE
:weexplugin:copyReleaseLint UP-TO-DATE
:weexplugin:compileReleaseRenderscript UP-TO-DATE
:weexplugin:generateReleaseBuildConfig UP-TO-DATE
:weexplugin:generateReleaseResValues UP-TO-DATE
:weexplugin:generateReleaseResources UP-TO-DATE
:weexplugin:packageReleaseResources UP-TO-DATE
:weexplugin:processReleaseManifest UP-TO-DATE
:weexplugin:processReleaseResources UP-TO-DATE
:weexplugin:generateReleaseSources UP-TO-DATE
:weexplugin:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:weexplugin:compileReleaseJavaWithJavac UP-TO-DATE
:weexplugin:extractReleaseAnnotations UP-TO-DATE
:weexplugin:mergeReleaseShaders UP-TO-DATE
:weexplugin:compileReleaseShaders UP-TO-DATE
:weexplugin:generateReleaseAssets UP-TO-DATE
:weexplugin:mergeReleaseAssets UP-TO-DATE
:weexplugin:mergeReleaseProguardFiles UP-TO-DATE
:weexplugin:packageReleaseRenderscript UP-TO-DATE
:weexplugin:processReleaseJavaRes UP-TO-DATE
:weexplugin:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:weexplugin:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:weexplugin:mergeReleaseJniLibFolders UP-TO-DATE
:weexplugin:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:weexplugin:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:weexplugin:bundleRelease UP-TO-DATE
:app:prepareAndroidAppframeworkUnspecifiedLibrary UP-TO-DATE
:app:prepareAndroidWeexpluginUnspecifiedLibrary UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee0100Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore0100Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco0100Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline0100Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase0100Library UP-TO-DATE
:app:prepareComJourneyappsZxingAndroidEmbedded340Library UP-TO-DATE
:app:prepareComTaobaoAndroidWeex_inspector01005Library UP-TO-DATE
:app:prepareComTaobaoAndroidWeex_sdk0100Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:unzipJacocoAgent FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:unzipJacocoAgent'.
> Could not expand ZIP '/home/scort/.gradle/caches/modules-2/files-2.1/org.jacoco/org.jacoco.agent/0.7.5.201505241946/2f0308aaf7b3f2e133d410de8af49739cb0964aa/org.jacoco.agent-0.7.5.201505241946.jar'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 15.032 secs
阅读 3.5k
2 个回答

在你的Android工程里的具体模块的build.gradle文件里配置

android { 
    ... 
    afterEvaluate { 
        unzipJacocoAgent.enabled = false 
    } 
}

试试看,记住不是项目根目录下的build.gradle

@荔枝我大哥 修改了项目中platforms/android/app/build.gradle文件中加入了你的配置,成功了!谢谢!!!

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进