###聞きたいこと
AndroidStudioで作製したコードを6月26日午前に実行し、実行できたのですが。翌日の6月27日午後夕方ごろに再度実行したらエラーで落ちてしまいました
コード自体は変えていなくコンパイルは通るのですが、実行時エラーで強制終了してしまいます。コードを見てみると、appのbulid.gradleのimplementation部分に赤い波線が書いてある部分がありました。build.gradleとエラーコードは以下に挙げます。どうすれば解決するでしょうか?
###唯一したこと
6月26日から6月27日の間でしたことは、ほかの人のプロジェクトデータをもらい自分の方でそのままコンパイル、実行をした。その時のbuild.gradleでのimplementationで記述されているバージョンはいつも使っているバージョンのものとは違うものをコンパイルし実行した。
###build.gradle
apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "自分のところのパッケージ" minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.1'//←ここの部分がエラーとなる implementation 'com.android.support.constraint:constraint-layout:1.1.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' // ここから下を追加 implementation 'com.google.android.gms:play-services-auth:15.0.1' implementation 'pub.devrel:easypermissions:0.1.5' implementation('com.google.api-client:google-api-client-android:1.22.0') { exclude group: 'org.apache.httpcomponents' } implementation('com.google.apis:google-api-services-sheets:v4-rev10-1.22.0') { exclude group: 'org.apache.httpcomponents' } }
###エラー部分
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 26.1.0. Examples include com.android.support:animated-vector-drawable:27.1.1 and com.android.support:support-media-compat:26.1.0 less... (Ctrl+F1)
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion).
###環境
・Windows10
・Android Studio3.1.3
・AndroidSDKTools 26.1.1
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/06/28 00:57