我正在facebook analytics
的phonegap
平台上工作。我已经有facebook plugins
登录和注册,这是完美的工作。com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com/facebook/AccessToken.class
Facebook plugins
拥有自己的模块。这是path: "phonegap-facebook-plugin:FacebookLib", configuration: "release"
。你可以在gradle
文件中看到这个。
我尝试了一些SO解决方案,但没有为我工作。
在为facebook analytics
添加compile dependencies
之后,我收到以下错误消息。
错误日志:
Error:Execution failed for task ':transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/facebook/AccessToken.class
这是我build.gradle
。
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
debugCompile project(path: "CordovaLib", configuration: "debug")
releaseCompile project(path: "CordovaLib", configuration: "release")
debugCompile project(path: "phonegap-facebook-plugin:FacebookLib", configuration: "debug")
releaseCompile project(path: "phonegap-facebook-plugin:FacebookLib", configuration: "release")
compile "com.android.support:support-v4:+"
compile "com.google.android.gms:play-services-auth:+"
compile "com.google.android.gms:play-services-identity:+"
compile "com.google.firebase:firebase-core:+"
compile "com.google.firebase:firebase-messaging:+"
compile "com.google.firebase:firebase-crash:+"
compile "com.google.firebase:firebase-config:+"
compile "com.mixpanel.android:mixpanel-android:4.9.1"
compile "com.google.android.gms:play-services-base:+"
compile "com.google.android.gms:play-services-gcm:+"
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile('com.crashlytics.sdk.android:answers:[email protected]') {
transitive = true;
}