在将branch.io添加到我的android项目后,出现重复的输入错误

Shubhendra

一切正常,但是将其添加到我的android项目后,构建apk的错误开始了。这是错误和依赖性

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复项:com / crashlytics / android / answers / shim / R.class

 compile('io.branch.sdk.android:library:2.6.0@aar') {
    transitive = true;
    exclude module: 'answers-shim'
}

尝试也排除它,但错误仍然存​​在。这是我的全部

buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://dl.bintray.com/hani-momanii/maven"}
}


android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "com.example.app"
    minSdkVersion 19
    targetSdkVersion 25
    multiDexEnabled true
    versionCode 1
    versionName "1.0"
    resConfigs "en_US", "hi_IN"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/LICENSE-FIREBASE.txt'
    exclude 'META-INF/NOTICE'
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('com.digits.sdk.android:digits:2.0.6@aar') {
    transitive = true;

}
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
    transitive = true;
}
compile('io.fabric.sdk.android:fabric:1.3.10@aar') {
    transitive = true;
}
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v13:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:gridlayout-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:support-annotations:25.3.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.android.gms:play-services-location:10.2.1'
compile 'com.google.android.gms:play-services-places:10.2.1'
compile 'com.amazonaws:aws-android-sdk-core:2.2.+'
compile 'com.amazonaws:aws-android-sdk-s3:2.2.+'
compile 'com.amazonaws:aws-android-sdk-ddb:2.2.+'
compile 'com.amazonaws:aws-android-sdk-lambda:2.2.+'
compile 'com.google.firebase:firebase-database:10.2.1'
compile 'com.google.firebase:firebase-core:10.2.1'
compile 'com.google.firebase:firebase-auth:10.2.1'
compile 'com.google.firebase:firebase-messaging:10.2.1'
compile 'com.google.firebase:firebase-crash:10.2.1'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.google.firebase:firebase-storage:10.2.1'
compile 'com.google.firebase:firebase-appindexing:10.2.1'
compile 'com.github.clans:fab:1.6.4'
compile 'com.amazonaws:aws-android-sdk-cognito:2.3.9'
compile 'hani.momanii.supernova_emoji_library:supernova-emoji-library:0.0.2'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile('io.branch.sdk.android:library:2.6.0@aar') {
    transitive = true;
    exclude module: 'answers-shim'
}

}
apply plugin: 'com.google.gms.google-services'

如果我将exclude语句添加到branch和digits,则在进入应用程序时会崩溃,如果将exclude添加到crashlytics则错误仍然存​​在。

贾罗德·霍利迪

我今天也整天都在努力。最终为我解决的是将分支回滚到2.5.9。新的2.6.0版本显然似乎有问题。

分支的另一个说明,我没有可传递的aar include,所以它只是

compile ('io.branch.sdk.android:library:2.5.9') {
    exclude module: 'answers-shim';
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

将Firebase添加到我的Android项目时出现错误

我是否将Spring Security正确添加到我的项目中?授权后访问错误

将 Nuxt 添加到我的 vue 项目后出错(vue-style-loader css 错误)

我将 *.aar 添加到我的项目中,当我运行它时,项目运行良好,但在开始活动时出现错误,如何解决?

将Bytescout的引用添加到我的项目后无法使用

将 JFileChooser 添加到我的项目后,IntelliJ 调试器不会停止

将 Firebase Crashlytics 添加到我的项目后,从 PlayServicesResolver 获取许多 NullReferenceException

无法将库项目添加到我的android项目中

将重复的键添加到我的字典中

我无法将支持库添加到我的Android Studio项目中

将按钮添加到我的React Native应用程序时出现错误?

将Google Analytics(分析)添加到我的应用中时出现XML错误

将OkHttp添加到我的项目

将SpotBugs添加到我的项目

将jar文件添加到我的Xamarin项目

无法将Firestore添加到我的项目

无法将CircularSeekBar添加到我的项目

如何将NAudio添加到我的项目?

无法将coreGraphics添加到我的项目中

将Django CMS添加到我的项目后,管理命令失败,并显示缓存错误。我该如何解决?

将模块添加到我的 Android 应用程序时出现 DuplicateFileException

如何将android支持库添加到我的netbeans项目中

将第3方代码添加到我的Android Studio项目中

如何将Bango SDK添加到我的android项目中?

将文件夹添加到我的Eclipse(Android)项目中

使用Eclipse将GooglePlayServices支持添加到我的Android项目中

如何将firebase-admin添加到我的Android项目?

EF - 将项目添加到虚拟 ICollection 后保存时出现 InvalidOperationException 错误

将本地脚本添加到角度项目后出现错误