我刚刚将应用程序从GCM迁移到FCM,该应用程序可以正常运行和调试,但是在生成apk文件时,错误显示如下:
在APK res / layout / notification_action.xml中复制的文件重复 档案1:D:\ Plus-Android \ PlusMuse \ build \ jarjar \ jarjar-20.jar File2:D:\ Plus-Android \ PlusMuse \ build \ jarjar \ jarjar-21.jar
我已经搜索了任何网站和论坛以找到解决方案,但仍然无济于事。 我的依赖: 依赖项{ 编译fileTree(include:['* .jar'],dir:'libs')
compile jarjar.repackage {
from 'com.google.firebase:firebase-messaging:17.3.3'
classDelete "com.google.android.gms.common.util.VisibleForTesting.class"
}
compile jarjar.repackage {
from 'com.google.firebase:firebase-appindexing:16.0.2'
classDelete "android.arch.lifecycle.LifecycleOwner.class"
}
compile project(':libs:com_actionbarsherlock')
compile project(':libs:holoEverywhereLib')
compile project(':libs:recoMediaLibrary')
compile project(':libs:preLollipopTransition')
compile project(':lyrimokit')
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-v4:26.0.+'
compile 'com.google.firebase:firebase-core:16.0.4'
compile 'com.google.firebase:firebase-messaging:17.3.3'
compile 'com.google.firebase:firebase-appindexing:16.0.2'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true
}
} 应用插件:“ com.google.gms.google-services”
我的包装选项
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
和
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.google.gms:google-services:4.0.2'
classpath "org.anarres.jarjar:jarjar-gradle:1.0.0"
}
那么,有人可以帮助我找出解决方案吗?
答案 0 :(得分:0)
转到android studio中的文件并执行无效的缓存/重启。