症状
Android Studioでのビルドにおいて以下のエラーが発生する
1 2 3 4 |
Error:A problem occurred configuring root project 'xxxx'. > Could not find support-v4.jar (com.android.support:support-v4:24.0.0). Searched in the following locations: https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.jar |
原因
Google Firebase が support-v4:24.0.0 に依存している。
You should update your local repository via the SDK Manager. It looks like ‘com.google.firebase:firebase-messaging:9.6.0’ depends on com.android.support:support-v4:24.0.0, which is not installed on your computer. This dependency is also not on Bintray, hence Gradle can’t find it there – this is what the error message says.
対策
build.gradleの更新(編集)
1 2 3 4 5 6 7 |
dependencies { compile .... compile 'com.android.support:support-v4:21.0.0' - compile 'com.android.support:appcompat-v7:21.0.0' + compile 'com.android.support:appcompat-v7:24.0.0' compile 'com.google.android.gms:play-services-base:10.0.1' compile 'com.google.android.gms:play-services-location:10.0.1' |