私のプロジェクトのbuild.gradle依存関係は次のとおりです。
dependencies {
...
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.google.android.gms:play-services-appinvite:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'co.realtime:messaging-android:2.1.58'
}
co.realtime :messageing-android build.gradleの依存関係は次のとおりです。
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile ('com.android.support:appcompat-v7:21.0.3'){
transitive = true;
}
compile ('com.google.android.gms:play-services:6.1.71'){
transitive = true;
}
compile ('com.googlecode.json-simple:json-simple:1.1'){
transitive = true;
}
}
プロジェクトをコンパイルしようとすると、次のエラーが発生します。
エラー: Gradle: タスク ':app-module:processProdDebugResources' の実行に失敗しました。エラー: パッケージ名 'com.google.android.gms' のライブラリが複数あります android.enforceUniquePackageName=false でこのエラーを一時的に無効にすることができます ただし、これは一時的なものであり、1.0 で強制される予定です
使用すると、次のようenforceUniquePackageName(false)になります。
シンボルをに解決できません
GoogleCloudMessaging.INSTANCE_ID_SCOPE
したがって、依存関係を管理することでこれを解決する必要があると思います。私はもう試した:
compile ('co.realtime:messaging-android:2.1.58'){
exclude module: 'com.google'
}
compile ('co.realtime:messaging-android:2.1.58'){
exclude group: 'com.google.android.gms', module: 'play-services-gcm'
}
しかし、何もうまくいきません...どうすればこれを解決できますか?
ありがとう。