我正在尝试为 android 构建我的应用程序,自从我将我的 android-cordova 更新到 6.2.3 后,我就无法再为 android 构建我的应用程序了。
回滚到 android-cordova 6.1.1 没有帮助,在上次升级后我无法再次构建。
完整的错误是
* What went wrong:
Execution failed for task ':transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate file
s copied in APK META-INF/rxjava.properties
File1: /Users/admin/Desktop/Gravity/clubezy-meteorionic/platforms/android/build/intermediates/exploded-aar/com.goo
gle.android.gms/play-services-basement/11.0.0/jars/classes.jar
File2: /Users/admin/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.1.9/e4362e62f1ba92e360b197d6d7ffae67e
5ecae9a/rxjava-1.1.9.jar
我怀疑这可能是我的一个cordova插件的问题,可能会导致这种情况。
这是我的环境和插件。
ionic info:
global packages:
@ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : ios 4.4.0, android 6.2.3
Ionic Framework : ionic-angular 3.4.2
System:
Node : v6.10.3
OS : Linux 4.4
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 5.0.3
cordova plugin ls
com.instabug.cordova.plugin 1.0.0 "instabug-cordova"
cordova-plugin-3dtouch 1.3.5 "3D Touch"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-camera 2.3.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-multidex 0.1.1 "Cordova Multi Dex"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
onesignal-cordova-plugin 2.0.11 "OneSignal Push Notifications"
我认为可能导致此问题的插件是 instabug 插件。
~编辑
在一次添加每个插件之后
com.instabug.cordova.plugin
或者cordova-plugin-multidex
导致它
multidex是instabug的依赖