更新playservice后支持v4问题

时间:2016-11-30 12:50:19

标签: android google-play-services

两周前,我的项目工作完美,突然出现了很多关于支持库的错误。我无法获得GCM ID。我在更新sdk后收到此错误。

我不确定这是什么原因??

我尝试了 THIS 链接,但在'com.google.android.gms:play-services-plus:9.0.0'

中收到错误

这是我的 LOGCAT

                                                              Caused by: java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com.google.android.gms.iid.zzd' appears in /data/app/com.hwindiapp.passenger-1/base.apk)
                                                                 at com.google.android.gms.iid.zzd.zzeC(Unknown Source)
                                                                 at com.google.android.gms.iid.zzd.<init>(Unknown Source)
                                                                 at com.google.android.gms.iid.zzd.<init>(Unknown Source)
                                                                 at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
                                                                 at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
                                                                 at com.mainProfile.classFiles.RegisterFbLoginResCallBack$registerFBUser.processGCMID_user(RegisterFbLoginResCallBack.java:166)
                                                                 at com.mainProfile.classFiles.RegisterFbLoginResCallBack$registerFBUser.doInBackground(RegisterFbLoginResCallBack.java:219)
                                                                 at com.mainProfile.classFiles.RegisterFbLoginResCallBack$registerFBUser.doInBackground(RegisterFbLoginResCallBack.java:153)
                                                                 at android.os.AsyncTask$2.call(AsyncTask.java:292)
                                                                 at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                 at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 
                                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
                                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
                                                                 at java.lang.Thread.run(Thread.java:818) 
11-30 17:57:40.703 8305-8375/com.hwindiapp.passenger E/ACRA: Not adding buildConfig to log. Class Not found : com.VolleyLibFiles.BuildConfig. Please configure 'buildConfigClass' in your ACRA config
11-30 17:57:41.031 8305-8409/com.hwindiapp.passenger E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
                                                                       Process: com.hwindiapp.passenger, PID: 8305
                                                                       java.lang.RuntimeException: An error occured while executing doInBackground()
                                                                           at android.os.AsyncTask$3.done(AsyncTask.java:304)
                                                                           at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
                                                                           at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
                                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:242)
                                                                           at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                           at java.lang.Thread.run(Thread.java:818)
                                                                        Caused by: java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com.google.android.gms.iid.zzd' appears in /data/app/com.hwindiapp.passenger-1/base.apk)
                                                                           at com.google.android.gms.iid.zzd.zzeC(Unknown Source)
                                                                           at com.google.android.gms.iid.zzd.<init>(Unknown Source)
                                                                           at com.google.android.gms.iid.zzd.<init>(Unknown Source)
                                                                           at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
                                                                           at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
                                                                           at com.mainProfile.classFiles.RegisterFbLoginResCallBack$registerFBUser.processGCMID_user(RegisterFbLoginResCallBack.java:166)
                                                                           at com.mainProfile.classFiles.RegisterFbLoginResCallBack$registerFBUser.doInBackground(RegisterFbLoginResCallBack.java:219)
                                                                           at com.mainProfile.classFiles.RegisterFbLoginResCallBack$registerFBUser.doInBackground(RegisterFbLoginResCallBack.java:153)
                                                                           at android.os.AsyncTask$2.call(AsyncTask.java:292)
                                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                           at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 
                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 

这是我的gradle

apply plugin: 'com.android.application'

android {
    signingConfigs {
        config {
            keyAlias 'hwindi'
            keyPassword '123456'
            storeFile file('D:/Company Projects/Hwindi/Project 2/Play_KeyStore/HwindiKeyStore.jks')
            storePassword '123456'
        }
    }
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    defaultConfig {
        applicationId "com.hwindiapp.passenger"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 14
        versionName "1.14"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'lib/arm64-v8a/libcardioDecider.so'
        exclude 'lib/arm64-v8a/libcardioRecognizer.so'
        exclude 'lib/arm64-v8a/libcardioRecognizer_tegra2.so'
        exclude 'lib/arm64-v8a/libopencv_core.so'
        exclude 'lib/arm64-v8a/libopencv_imgproc.so'
        exclude 'lib/armeabi/libcardioDecider.so'
        exclude 'lib/armeabi-v7a/libcardioDecider.so'
        exclude 'lib/armeabi-v7a/libcardioRecognizer.so'
        exclude 'lib/armeabi-v7a/libcardioRecognizer_tegra2.so'
        exclude 'lib/armeabi-v7a/libopencv_core.so'
        exclude 'lib/armeabi-v7a/libopencv_imgproc.so'
        exclude 'lib/mips/libcardioDecider.so'
        exclude 'lib/x86/libcardioDecider.so'
        exclude 'lib/x86/libcardioRecognizer.so'
        exclude 'lib/x86/libcardioRecognizer_tegra2.so'
        exclude 'lib/x86/libopencv_core.so'
        exclude 'lib/x86/libopencv_imgproc.so'
        exclude 'lib/x86_64/libcardioDecider.so'
        exclude 'lib/x86_64/libcardioRecognizer.so'
        exclude 'lib/x86_64/libcardioRecognizer_tegra2.so'
        exclude 'lib/x86_64/libopencv_core.so'
        exclude 'lib/x86_64/libopencv_imgproc.so'
    }
    /*configurations.all {
        resolutionStrategy {
            force 'com.android.support:design:23.4.0'
            force 'com.android.support:support-v4:23.4.0'
        }
    }*/

}
repositories {
    mavenCentral()
    maven { url "https://jitpack.io" }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:support-v4:23.4.0'
    compile ('com.android.support:appcompat-v7:23.0.1')
            {
                exclude module: 'support-v4'
            }
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:cardview-v7:23.1.1'
    compile 'com.android.support:recyclerview-v7:23.1.1+'
    compile 'com.google.android.gms:play-services-gcm:9.0.0'
    compile 'com.google.android.gms:play-services-location:9.0.0'
    compile 'com.google.android.gms:play-services-maps:9.0.0'
    compile 'com.google.android.gms:play-services-plus:9.0.0'
    compile ('com.facebook.android:facebook-android-sdk:[4,5)') {
        exclude module: 'support-v4'
    }
    compile 'com.paypal.sdk:paypal-android-sdk:2.13.3'
    compile 'com.wdullaer:materialdatetimepicker:2.2.0'
    compile 'com.mukesh:permissions:1.0.3'
    compile 'com.android.support:multidex:1.0.1'
}

0 个答案:

没有答案