首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ionic生成错误::mergeDebugAssets无法合并源集文件夹

Ionic生成错误::mergeDebugAssets无法合并源集文件夹
EN

Stack Overflow用户
提问于 2017-07-25 14:28:00
回答 2查看 1.1K关注 0票数 0

每当我尝试运行"ionic build android“时,我都会得到这个错误,构建过程运行了一半,并在这一行之后显示错误:

代码语言:javascript
复制
:mergeDebugAssets
Could not merge source set folders: 

我已经在过去的24小时内尝试了所有可用的答案,但都不起作用,在将JDK更新到最新版本后,我开始收到这个错误。

到目前为止,我已经尝试过了。更新了Android SDK,移除了Android平台并将其添加回来,将android平台更新为android@6.2.2,从package.json文件中删除了所有开发依赖项尝试替换Android SDK中的tools文件夹,但没有任何工作。我的离子信息你的系统信息:

代码语言:javascript
复制
Cordova CLI: 6.5.0 
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
ios-deploy version: 1.9.0 
ios-sim version: 5.0.10 
OS: macOS Sierra
Node Version: v6.11.0
Xcode version: Xcode 8.3.3 Build version 8E3004b

下面是较大的错误日志,

代码语言:javascript
复制
add to body class: platform-android

ANDROID_HOME=/Users/amitabhs/Library/Android/sdk

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home

:wrapper




BUILD SUCCESSFUL


Total time: 1.744 secs

Subproject Path: CordovaLib

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

        at build_7w3ckihviy9j3ktiflnuopmyu.run(/Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/build.gradle:138)

The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.


Incremental Java compilation is an incubating feature.


The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.


:preBuild
 UP-TO-DATE
:preDebugBuild UP-TO-DATE

:checkDebugManifest


:preReleaseBuild
 UP-TO-DATE

:CordovaLib:preBuild
 UP-TO-DATE

:CordovaLib:preDebugBuild

UP-TO-DATE
:CordovaLib:checkDebugManifest


:CordovaLib:prepareDebugDependencies

:CordovaLib:compileDebugAidl


:CordovaLib:compileDebugNdk

UP-TO-DATE
:CordovaLib:compileLint


:CordovaLib:copyDebugLint

UP-TO-DATE

:CordovaLib:mergeDebugShaders


:CordovaLib:compileDebugShaders


:CordovaLib:generateDebugAssets


:CordovaLib:mergeDebugAssets


:CordovaLib:mergeDebugProguardFiles


:CordovaLib:packageDebugRenderscript

UP-TO-DATE

:CordovaLib:compileDebugRenderscript


:CordovaLib:generateDebugResValues


:CordovaLib:generateDebugResources


:CordovaLib:packageDebugResources


:CordovaLib:processDebugManifest


:CordovaLib:generateDebugBuildConfig


:CordovaLib:processDebugResources


:CordovaLib:generateDebugSources

:CordovaLib:incrementalDebugJavaCompilationSafeguard


:CordovaLib:compileDebugJavaWithJavac


:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processDebugJavaRes

UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForDebug


:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug


:CordovaLib:mergeDebugJniLibFolders


:CordovaLib:transformNative_libsWithMergeJniLibsForDebug


:CordovaLib:transformNative_libsWithSyncJniLibsForDebug


:CordovaLib:bundleDebug


:CordovaLib:preReleaseBuild
 UP-TO-DATE

:CordovaLib:checkReleaseManifest


:CordovaLib:prepareReleaseDependencies


:CordovaLib:compileReleaseAidl


:CordovaLib:compileReleaseNdk

UP-TO-DATE
:CordovaLib:copyReleaseLint

UP-TO-DATE

:CordovaLib:mergeReleaseShaders


:CordovaLib:compileReleaseShaders


:CordovaLib:generateReleaseAssets


:CordovaLib:mergeReleaseAssets


:CordovaLib:mergeReleaseProguardFiles


:CordovaLib:packageReleaseRenderscript

UP-TO-DATE
:CordovaLib:compileReleaseRenderscript


:CordovaLib:generateReleaseResValues


:CordovaLib:generateReleaseResources

:CordovaLib:packageReleaseResources


:CordovaLib:processReleaseManifest


:CordovaLib:generateReleaseBuildConfig


:CordovaLib:processReleaseResources

:CordovaLib:generateReleaseSources

:CordovaLib:incrementalReleaseJavaCompilationSafeguard

:CordovaLib:compileReleaseJavaWithJavac

:CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processReleaseJavaRes

UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease


:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease


:CordovaLib:mergeReleaseJniLibFolders


:CordovaLib:transformNative_libsWithMergeJniLibsForRelease


:CordovaLib:transformNative_libsWithSyncJniLibsForRelease


:CordovaLib:bundleRelease


:prepareComAndroidSupportSupportV132340Library


:prepareComAndroidSupportSupportV42400Library


:prepareComGoogleAndroidGmsPlayServicesBase980Library


:prepareComGoogleAndroidGmsPlayServicesBasement980Library


:prepareComGoogleAndroidGmsPlayServicesGcm980Library


:prepareComGoogleAndroidGmsPlayServicesIid980Library


:prepareComGoogleAndroidGmsPlayServicesTasks980Library


:prepareMeLeolinShortcutBadger114Library


:prepareOrgApacheCordovaCordovaLib622DebugLibrary


:prepareDebugDependencies


:compileDebugAidl


:compileDebugRenderscript


:generateDebugBuildConfig


:generateDebugResValues


:generateDebugResources

:mergeDebugResources

:processDebugManifest


:processDebugResources


:generateDebugSources


:incrementalDebugJavaCompilationSafeguard


:compileDebugJavaWithJavac

:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

:compileDebugNdk

UP-TO-DATE
:compileDebugSources


:mergeDebugShaders


:compileDebugShaders


:generateDebugAssets


:mergeDebugAssets
Could not merge source set folders:





 * What went wrong:
    Execution failed for task ':mergeDebugAssets'.
    > [www/lib/angularjs-slider/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/angularjs-slider/node_modules/semver/semver.browser.js  [www/lib/angularjs-slider/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/angularjs-slider/node_modules/semver/semver.browser.js.gz: Error: Duplicate resources
      [www/lib/ion-autocomplete/node_modules/bower/lib/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ion-autocomplete/node_modules/bower/lib/node_modules/semver/semver.browser.js    [www/lib/ion-autocomplete/node_modules/bower/lib/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ion-autocomplete/node_modules/bower/lib/node_modules/semver/semver.browser.js.gz: Error: Duplicate resources
      [www/lib/ion-autocomplete/node_modules/bower/lib/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ion-autocomplete/node_modules/bower/lib/node_modules/semver/semver.min.js    [www/lib/ion-autocomplete/node_modules/bower/lib/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ion-autocomplete/node_modules/bower/lib/node_modules/semver/semver.min.js.gz: Error: Duplicate resources
      [www/lib/underscore/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/underscore/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar        [www/lib/underscore/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/underscore/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar.gz: Error: Duplicate resources
      [www/lib/ion-autocomplete/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ion-autocomplete/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar    [www/lib/ion-autocomplete/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ion-autocomplete/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar.gz: Error: Duplicate resources
      [www/lib/angularjs-slider/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/angularjs-slider/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar    [www/lib/angularjs-slider/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/angularjs-slider/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar.gz: Error: Duplicate resources
      [www/lib/fingerprintjs2/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/fingerprintjs2/node_modules/semver/semver.min.js      [www/lib/fingerprintjs2/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/fingerprintjs2/node_modules/semver/semver.min.js.gz: Error: Duplicate resources
      [www/lib/ngCordova/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ngCordova/node_modules/semver/semver.browser.js        [www/lib/ngCordova/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ngCordova/node_modules/semver/semver.browser.js.gz: Error: Duplicate resources
      [www/lib/fingerprintjs2/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/fingerprintjs2/node_modules/semver/semver.browser.js      [www/lib/fingerprintjs2/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/fingerprintjs2/node_modules/semver/semver.browser.js.gz: Error: Duplicate resources
      [www/lib/angularjs-slider/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/angularjs-slider/node_modules/semver/semver.min.js  [www/lib/angularjs-slider/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/angularjs-slider/node_modules/semver/semver.min.js.gz: Error: Duplicate resources
      [www/lib/underscore/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/underscore/node_modules/semver/semver.browser.js      [www/lib/underscore/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/underscore/node_modules/semver/semver.browser.js.gz: Error: Duplicate resources
      [www/lib/ion-autocomplete/node_modules/log4js/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/asse
    ts/www/lib/ion-autocomplete/node_modules/log4js/node_modules/semver/semver.browser.js   [www/lib/ion-autocomplete/node_modules/log4js/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ion-autocomplete/node_modules/log4js/node_modules/semver/semver.browser.js.gz: Error: Duplicate resources
      [www/lib/ngCordova/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ngCordova/node_modules/semver/semver.min.js        [www/lib/ngCordova/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ngCordova/node_modules/semver/semver.min.js.gz: Error: Duplicate resources
      [www/lib/ngCordova/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ngCordova/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar  [www/lib/ngCordova/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ngCordova/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar.gz: Error: Duplicate resources
      [www/lib/underscore/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/underscore/node_modules/semver/semver.min.js      [www/lib/underscore/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/underscore/node_modules/semver/semver.min.js.gz: Error: Duplicate resources
      [www/lib/ion-autocomplete/node_modules/log4js/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ion-autocomplete/node_modules/log4js/node_modules/semver/semver.min.js  [www/lib/ion-autocomplete/node_modules/log4js/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ion-autocomplete/node_modules/log4js/node_modules/semver/semver.min.js.gz: Error: Duplicate resources
      [www/lib/ionic-ratings/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ionic-ratings/node_modules/semver/semver.browser.js        [www/lib/ionic-ratings/node_modules/semver/semver.browser.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ionic-ratings/node_modules/semver/semver.browser.js.gz: Error: Duplicate resources
      [www/lib/ionic-ratings/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ionic-ratings/node_modules/semver/semver.min.js        [www/lib/ionic-ratings/node_modules/semver/semver.min.js] /Users/amitabhs/Projects/Kudaap/KudaapCourts/Mobile/KudappIonic_Courts/platforms/android/assets/www/lib/ionic-ratings/node_modules/semver/semver.min.js.gz: Error: Duplicate resources

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

完整的错误日志非常大,请查看here

EN

回答 2

Stack Overflow用户

发布于 2017-10-16 22:45:01

解决方案是删除semver目录。

票数 0
EN

Stack Overflow用户

发布于 2018-01-31 05:51:16

为了解决这个问题,我从项目中删除了semver.min.js.gz和semver.browser.js.gz的所有实例。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45295468

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档