2017-12-06 3 views
-3

を解決することができない私は、私は、このエラーを与えているkotlinandroidappを持っている...

Error:Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: class com.google.firebase.auth.FirebaseAuth, unresolved supertypes: com.google.android.gms.internal.aad

この

Error:Execution failed for task ':app:compileDebugKotlin'.

コンパイルエラー。詳細

のためにログを参照してください、これは私のアプリモジュール

apply plugin: 'com.android.application' 

apply plugin: 'kotlin-android' 

apply plugin: 'kotlin-android-extensions' 

android { 
    compileSdkVersion 26 
    defaultConfig { 
     applicationId "appname" 
     minSdkVersion 15 
     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 "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 

    implementation 'com.android.support:appcompat-v7:26.1.0' 
    implementation 'com.android.support:animated-vector-drawable:26.1.0' 
    implementation 'com.android.support:mediarouter-v7:26.1.0' 
    implementation 'com.android.support.constraint:constraint-layout:1.0.2' 
    implementation 'com.android.support:appcompat-v7:26.1.0' 
    implementation 'com.android.support:recyclerview-v7:26.1.0' 
    implementation 'com.android.support:cardview-v7:26.1.0' 
    implementation 'com.android.support:design:26.1.0' 

    implementation 'com.firebaseui:firebase-ui-database:3.0.0' 



    //noinspection GradleCompatible,GradleCompatible 
    implementation 'com.google.android.gms:play-services:11.0.4' 
    implementation 'com.google.firebase:firebase-auth:11.0.4' 
    implementation 'com.google.firebase:firebase-database:11.0.4' 
    implementation 'com.google.firebase:firebase-storage:11.0.4' 
    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 "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 

} 

repositories { 
    mavenCentral() 
} 
apply plugin: 'com.google.gms.google-services' 

で、私のプロジェクトのGradleは私がfirebase.auth implemetationを持っているが、まだそれは私にエラーを見せているこの

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    ext.kotlin_version = '1.1.51' 
    repositories { 
     google() 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.1' 
     classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
     classpath 'com.google.gms:google-services:3.1.0' 

    } 
} 

allprojects { 
    repositories { 
     google() 
     jcenter() 
     maven { url "https://jitpack.io" } 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

です。

+0

をfirebaseするアップデートを、あなたの依存関係の順序を変更しようとしたことがありますか? –

答えて

0

は、私はあなたのGradleファイルの中に少なくとも2つの問題を参照してください。

  1. あなた "kotlin-STDLIB-jre7"(1つの実装と1つのコンパイル)のために重複したエントリを持っています。最後の1を削除します。

    compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 
    
  2. はfirebase & Google Playのサービスの最新バージョン使用していない:11.6.2