2017-03-11 4 views
2

Es baut in Ordnung, aber wenn ich laufe es wird diesen Fehler: es nicht geschehen, bis ichAndroid Proguard Probleme (doppelte) beim Hinzufügen von Facebook sdk & Google Firebase sdk

Warning:Exception while processing task java.io.IOException: Can't write [/var/android_projects/Aflam/Aflam/app/build/intermediates/transforms/proguard/debug/jars/3/1f/main.jar] (Can't read [/home/omar/.android/build-cache/7b35109bbea465da27464678b5f699568c4204d8/output/jars/classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:com/google/android/gms/internal/zzw$zza.class]))

Proguard rules: 
{ 

    -keep class org.apache.http.** { *; } 
    -keep class com.google.android.gms.** 

    -dontwarn com.google.android.gms.** 
    -dontwarn com.google.ads.** 
    -dontwarn org.apache.http.** 
    -dontwarn android.net.** 

    -dontnote com.google.android.gms.** 
    -dontnote org.apache.http.** 
    -dontnote com.android.net.http.** 
    -dontnote android.net.** 
} 


dependencies { 

    //compile fileTree(dir: 'libs', include: ['*.jar']) 
    //testCompile 'junit:junit:4.12' 
    compile ('com.facebook.android:audience-network-sdk:4.+') { 
     exclude module: 'bolts-android' 
     exclude module: 'support-v4' 
    } 
    compile(name:'unity-ads',ext:'aar') 
    compile 'com.codemybrainsout.rating:ratingdialog:1.0.7' 
    compile 'com.google.firebase:firebase-core:10.2.0' 
    compile 'com.google.firebase:firebase-messaging:10.2.0' 
} 

Antwort

1

Es Feuerbasis hinzufügen scheint, dass play-services-ads Version 8.4.0 in audience-network-sdk Modul mit Abhängigkeiten com.google.android.gms niedrigerer Version ausschließen play-services-ads und fügen play-services-ads:10.2.0 danach hat:

dependencies { 
    compile ('com.facebook.android:audience-network-sdk:4.+') { 
     exclude module: 'play-services-ads' 
    } 
    compile(name:'unity-ads',ext:'aar') 
    compile 'com.codemybrainsout.rating:ratingdialog:1.0.7' 
    compile 'com.google.firebase:firebase-core:10.2.0' 
    compile 'com.google.android.gms:play-services-ads:10.2.0' 
} 
+0

Es hat funktioniert, vielen Dank :) –