已从Android Studio 2.3.3更新为3.0 导入我的项目并收到此错误:
Program type already present: com.google.firebase.iid.zzd
Message{kind=ERROR, text=Program type already present: com.google.firebase.iid.zzd, sources=[Unknown source file], tool name=Optional.of(D8)}
等级:
apply plugin: 'com.android.application'
//Optionally configure your OneSignal IDs below
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: "",
onesignal_google_project_number: ""]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
dexOptions {
jumboMode true
}
}
repositories {
flatDir {
dirs 'libs'
}
maven {
url "https://jitpack.io"
}
jcenter();
}
dependencies {
compile 'com.devbrackets.android:exomedia:4.0.3' //TV
compile 'com.google.android.exoplayer:exoplayer:r2.4.3' //TV & Radio
compile 'com.cleveroad:audiovisualization:1.0.0' //Radio
compile 'com.google.code.gson:gson:2.8.0' //WC
compile 'com.squareup.okhttp3:okhttp:3.7.0' //WC
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.onesignal:OneSignal:[3.6.5,4.0.0)'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.booking:rtlviewpager:1.0.1'
compile 'com.github.apg-mobile:android-round-textview:v0.0.3'
compile 'com.github.chrisbanes:PhotoView:1.3.0'
compile "com.android.support:cardview-v7:$supportlib_version"
compile "com.android.support:appcompat-v7:$supportlib_version"
compile "com.android.support:recyclerview-v7:$supportlib_version"
compile "com.android.support:design:$supportlib_version"
compile "com.android.support:support-v4:$supportlib_version"
compile "com.android.support:support-core-utils:$supportlib_version"
compile "com.android.support:support-media-compat:$supportlib_version"
compile "com.google.android.gms:play-services-gcm:$gps_version"
compile "com.google.android.gms:play-services-ads:$gps_version"
compile "com.google.android.gms:play-services-maps:$gps_version"
compile 'com.google.maps.android:android-maps-utils:0.5+'
compile files('libs/YouTubeAndroidPlayerApi.jar')
}
答案 0 :(得分:0)
找到问题的解决方案并不需要太长时间。我必须将$ gps_version更新为最新版本,并且项目可以正常运行,并且错误消失了
compile "com.google.android.gms:play-services-gcm:$gps_version"
compile "com.google.android.gms:play-services-ads:$gps_version"
compile "com.google.android.gms:play-services-maps:$gps_version"