我正在使用cordova和Ionic框架构建应用程序.
但是现在当我构建我的项目时,我遇到了错误:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotations/AnimRes;
Run Code Online (Sandbox Code Playgroud)
其他SO解决方案提到多个android-support-v4.jar文件冲突,但android-support-v4.jar我能找到的唯一文件是在facebook插件中.
另一个解决方案提到了冲突的版本(即android-support-v4.jar冲突android-support-v13.jar) - 再次,我看android-support-v13.jar不到我的项目中的任何引用.
另一种解决方案是相互矛盾android-support-annotations.jar和android-support-v4.jar:多DEX文件定义landroid /支持/注解/ AnimRes.我android-support-annotations.jar在项目中找不到任何文件,除了在以下内容中创建的内容:myProject\platforms\android\build\intermediates\pre-dexed\debug

但是我不明白这是如何创建的.
我怎么解决这个问题?问题很容易复制:
>ionic start myApp tabs
>cd myApp
>cordova plugin add https://github.com/Wizcorp/phonegap-facebook-plugin.git --variable APP_ID="123456789" --variable APP_NAME="myApplication"
>cordova plugin add cordova-plugin-admobpro
>ionic platform android
>ionic build android
Run Code Online (Sandbox Code Playgroud)
(其中APP_ID和APP_NAME是facebook应用程序的ID和名称)