2017-07-07 2 views
-3

ich diesen bulild.gradle habenAndroid: kann nicht richtig eingestellt build.gradle

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 23 
buildToolsVersion "23.0.2" 

defaultConfig { 
    applicationId "my.package" 
    minSdkVersion 15 
    targetSdkVersion 23 
    versionCode 2 
    versionName "2.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

repositories { 
mavenCentral() 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:23.1.1' 
compile 'com.android.support:design:23.1.1' 
compile 'me.dm7.barcodescanner:zxing:1.8.4' 
compile 'com.google.firebase:firebase-messaging:9.0.0' 
compile 'com.squareup.okhttp3:okhttp:3.2.0' 
compile files('libs/urlimageviewhelper-1.0.4.jar') 
compile 'com.mcxiaoke.volley:library:1.0.19' 
compile 'com.squareup.picasso:picasso:2.3.2' 
compile 'com.nineoldandroids:library:2.4.0' 
compile 'com.daimajia.slider:library:[email protected]' 
compile 'com.github.ksoichiro:android-observablescrollview:1.6.0' 
compile 'com.makeramen:roundedimageview:2.2.1' 
compile 'com.github.JakeWharton:ViewPagerIndicator:2.4.1' 
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' 
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 
compile 'it.sephiroth.android.library.horizontallistview:hlistview:1.2.2' 
compile 'com.facebook.android:facebook-android-sdk:[4,5)' 


} 

apply plugin: 'com.google.gms.google-services' 

und ich erhalte diesen Fehler.

Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. 

Fand heraus, dass ich Versionen von Android-Unterstützung zu ändern, also tat ich es

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 25 
buildToolsVersion "23.0.2" 

defaultConfig { 
    applicationId "sk.weyou.matej_kosut.sowosk" 
    minSdkVersion 15 
    targetSdkVersion 23 
    versionCode 2 
    versionName "2.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

repositories { 
mavenCentral() 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:25.3.1' 
compile 'com.android.support:design:25.3.1' 
compile 'me.dm7.barcodescanner:zxing:1.8.4' 
compile 'com.google.firebase:firebase-messaging:9.0.0' 
compile 'com.squareup.okhttp3:okhttp:3.2.0' 
compile files('libs/urlimageviewhelper-1.0.4.jar') 
compile 'com.mcxiaoke.volley:library:1.0.19' 
compile 'com.squareup.picasso:picasso:2.3.2' 
compile 'com.nineoldandroids:library:2.4.0' 
compile 'com.daimajia.slider:library:[email protected]' 
compile 'com.github.ksoichiro:android-observablescrollview:1.6.0' 
compile 'com.makeramen:roundedimageview:2.2.1' 
compile 'com.github.JakeWharton:ViewPagerIndicator:2.4.1' 
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' 
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 
compile 'it.sephiroth.android.library.horizontallistview:hlistview:1.2.2' 
compile 'com.facebook.android:facebook-android-sdk:[4,5)' 


} 

    apply plugin: 'com.google.gms.google-services' 

und jetzt

FATAL EXCEPTION: main 
                     Process: sk.weyou.matej_kosut.sowosk, PID: 14788 
                     java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.firebase.iid.zzg' (declaration of 'com.google.firebase.iid.zzg' appears in /data/app/sk.weyou.matej_kosut.sowosk-1/base.apk) 
                      at com.google.firebase.iid.zzg.zzeC(Unknown Source) 
                      at com.google.firebase.iid.zzg.<init>(Unknown Source) 
                      at com.google.firebase.iid.zzg.<init>(Unknown Source) 
                      at com.google.firebase.iid.zzd.zzb(Unknown Source) 
                      at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source) 
                      at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source) 
                      at com.google.firebase.messaging.FirebaseMessaging.getInstance(Unknown Source) 
                      at sk.weyou.matej_kosut.sowosk.login_reg.LoginService.onPostExecute(LoginService.java:148) 
                      at sk.weyou.matej_kosut.sowosk.login_reg.LoginService.onPostExecute(LoginService.java:37) 
                      at android.os.AsyncTask.finish(AsyncTask.java:632) 
                      at android.os.AsyncTask.access$600(AsyncTask.java:177) 
                      at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) 
                      at android.os.Handler.dispatchMessage(Handler.java:111) 
                      at android.os.Looper.loop(Looper.java:194) 
                      at android.app.ActivityThread.main(ActivityThread.java:5550) 
                      at java.lang.reflect.Method.invoke(Native Method) 
                      at java.lang.reflect.Method.invoke(Method.java:372) 
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750) 

einen anderen Fehler erhalte ich, wenn

Feuerbasis an der Linie mit
FirebaseMessaging.getInstance().subscribeToTopic(" "); 

, die wahrscheinlich diese alten Versionen zurück wollen, denke ich.

Oder was soll ich ändern? Ich versuche es von Montag an herauszufinden.

Antwort

0

Ihre Kompilierung SDK-Version muss der Support-Bibliothek übereinstimmen, versuchen Sie diese Änderung

buildToolsVersion "23.0.2" 

zu

buildToolsVersion "25.0.2" 
Verwandte Themen