2017-11-28 6 views
0

私は単純なアプリケーションをビルドしていますが、私のbuild.gradle(Module App)はすべてデフォルトのコードを持っています:混合バージョンの修正方法 - build.gradle(モジュール:app)実装のエラー

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    defaultConfig { 
     applicationId "gr.aegean.icsd.samossellbuy" 
     minSdkVersion 19 
     targetSdkVersion 26 
     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:26.1.0' // line 23 
    implementation 'com.android.support.constraint:constraint-layout:1.0.2' 
    testImplementation 'junit:junit:4.12' 
    androidTestImplementation 'com.android.support.test:runner:1.0.1' 
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 
    compile 'com.facebook.android:facebook-android-sdk:[4,5)' 
} 

私がコンパイルし、エミュレータにアプリケーションを実行すると、それはすぐに


  • エラーメッセージライン23クラッシュ:

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 26.1.0, 25.3.1. Examples include com.android.support:animated-vector-drawable:26.1.0 and com.android.support:cardview-v7:25.3.1 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.

私は、私はできるだけ多くの詳細私ができるようになるには、Androidのメーカーでcompletly新しい試みたんです。

ありがとうございました!

+0

あなたはcompileSdkVersion後、あなたのGradle –

+0

場所にbuildToolsVersion「26.0.0」を欠けています –

+0

@vikaskumar私はそれをしましたが、今度はエラーが出ました – Phill

答えて

0

implementationcompileに変更してください。ライブラリは、新たなサポートライブラリの更新のAndroid Studioを使用するように更新されていないため

apply plugin: 'com.android.application' 

    android { 
     compileSdkVersion 26 
     buildToolsVersion "26.0.0" 
     defaultConfig { 
      applicationId "gr.aegean.icsd.samossellbuy" 
      minSdkVersion 19 
      targetSdkVersion 26 
      versionCode 1 
      versionName "1.0" 
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
     } 
     buildTypes { 
      release { 
       minifyEnabled false 
       proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      } 
     } 
    } 

    dependencies { 
     compile fileTree(dir: 'libs', include: ['*.jar']) 
     compile 'com.android.support:appcompat-v7:26.1.0' // line 23 
     compile 'com.android.support.constraint:constraint-layout:1.0.2' 
     testImplementation 'junit:junit:4.12' 
     androidTestImplementation 'com.android.support.test:runner:1.0.1' 
     androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 
     compile 'com.facebook.android:facebook-android-sdk:[4,5)' 
    } 
+0

私は次のエラーが表示されます:arguementsのメソッドandroid()が見つかりませんでした。 'org.gradle.api.Projectタイプのプロジェクト':app – Phill

+0

エミュレータがまだクラッシュする:/ – Phill

+0

トップレベルのbuild.gradleを変更するのではなく、モジュールレベルのbuild.gradle –

0

これがある - >アップデートの有無をチェック

関連する問題