应用程序崩溃在背景中

时间:2017-06-06 11:20:14

标签: android react-native react-native-android

我建立了一个appilicaionin,我使用facebbok登录和谷歌登录和在Android中,当我点击实例按钮它显示你的应用程序正在停止。 这是日志:

 06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime: FATAL EXCEPTION: main
06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime: Process: com.xyzies, PID: 9903
06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime: java.lang.AbstractMethodError: abstract method “void com.google.android.gms.internal.zzaac$zza.zzas(boolean)”
06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime:     at com.google.android.gms.internal.zzaac.zzas(Unknown Source)
06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime:     at com.google.android.gms.internal.zzaac.onTrimMemory(Unknown Source)
06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime:     at android.app.Application.onTrimMemory(Application.java:136)
06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime:     at android.app.ActivityThread.handleTrimMemory(ActivityThread.java:4965)
06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
06-05 18:43:55.779 9903-9903/com.xyzies E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:154)

请帮我解决这个问题 下面附上build.gradle文件

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.xyzies"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 4
        versionName "1.3"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    signingConfigs {
        release {
            storeFile file(MYAPP_RELEASE_STORE_FILE)
            storePassword MYAPP_RELEASE_STORE_PASSWORD
            keyAlias MYAPP_RELEASE_KEY_ALIAS
            keyPassword MYAPP_RELEASE_KEY_PASSWORD
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"

        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    compile project(':react-native-fbsdk')
compile project(':react-native-android-permissions')
    compile project(':react-native-device-info')
    compile project(':react-native-push-notification')

    compile project(':react-native-barcodescanner')

    compile project(':react-native-camera')
    compile project(':react-native-image-picker')
     compile 'com.parse.bolts:bolts-android:1.+'
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
    compile project(":react-native-google-signin")

    compile 'com.google.android.gms:play-services-auth:10.2.1' // should be at least 9.0.0
      compile 'com.facebook.android:facebook-android-sdk:4.0.0'
}
apply plugin: 'com.google.gms.google-services' // <--- this should be the last line
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
  from configurations.compile
  into 'libs'
}

0 个答案:

没有答案