应用程序崩溃,在API低于20的情况下getGoogleAppId错误,在发布应用

时间:2016-02-07 16:16:33

标签: android api google-maps crash app-id

我刚刚启动了一个应用程序,最近我只是在设备API 20+上进行测试,它似乎运行良好,并且在上周进行了一些更改,但是当我发布它时,该应用程序将无法启动具有API的设备低于20。

这是Logcat信息

02-07 10:54:43.470 28590-28590/com.***.taximetro I/dalvikvm: 
DexOpt: unable to optimize static field ref 0x24a1 at 0x6e in Lcom/google/android/gms/common/GooglePlayServicesUtil;.zza
02-07 10:54:43.750 28590-28687/com.***.taximetro I/GMPM: App measurement is starting up
02-07 10:54:43.760 28590-28687/com.***.taximetro E/GMPM: getGoogleAppId failed with status: 10
02-07 10:54:43.760 28590-28687/com.***.taximetro E/GMPM: Uploading is not possible. App measurement disabled

我尝试用调试器隔离bug,但我唯一知道的是错误发生在" setContentView"指挥我的主要活动。

这在我以前从未发生过,对我来说这是一个真正未知的错误,所以这里是我的清单文件,如果你问你需要什么,愿意发帖更多。

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.temix.application.taximetro"
    android:installLocation="auto">

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

    <!-- Requires Open GL 2.0, no permitira que dispositivos sin esta version puedan instalar la aplicacion -->
    <application
        android:name="com.temix.application.taximetro.Temix"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        tools:replace="android:icon">
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="AIzaSyCM6GTw73hMzaT2H_esputR65c" />
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />

        <activity
            android:name="com.temix.application.taximetro.activities.LauncherActivity"
            android:theme="@style/AppTheme.NoActionBar">
        </activity>

        <activity
            android:name="com.temix.application.taximetro.activities.DataActivity"
            android:launchMode="singleTask"
            android:theme="@style/AppTheme.NoActionBar.Translucent"
            android:windowSoftInputMode="stateHidden|adjustNothing">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.temix.application.taximetro.activities.UnitsActivity"
            android:launchMode="singleTask"
            android:theme="@style/AppTheme.NoActionBar.Translucent"
            android:windowSoftInputMode="stateHidden">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.temix.application.taximetro.activities.DataActivity" />
        </activity>
        <activity
            android:name="com.temix.application.taximetro.activities.AwardsActivity"
            android:launchMode="singleTask"
            android:theme="@style/AppTheme.NoActionBar.Translucent">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.temix.application.taximetro.activities.DataActivity" />
        </activity>
        <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <activity
            android:name="com.temix.application.taximetro.activities.LogInActivity"
            android:launchMode="singleTask"
            android:theme="@style/AppTheme.NoActionBar"
            android:windowSoftInputMode="adjustResize|stateHidden">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.temix.application.taximetro.activities.DataActivity" />
        </activity>
        <activity
            android:name="com.temix.application.taximetro.activities.SettingsActivity"
            android:label="@string/action_settings"
            android:launchMode="singleTask"
            android:theme="@style/AppTheme">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.temix.application.taximetro.activities.DataActivity" />
        </activity>
        <activity
            android:name="com.temix.application.taximetro.activities.SearchCabActivity"
            android:launchMode="singleTask"
            android:theme="@style/AppTheme.NoActionBar.Translucent"
            android:windowSoftInputMode="stateHidden|adjustNothing">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.temix.application.taximetro.activities.DataActivity" />
        </activity>
        <activity
            android:name="com.temix.application.taximetro.activities.LegalTermsActivity"
            android:theme="@style/AppTheme.NoActionBar.Translucent">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.temix.application.taximetro.activities.DataActivity" />
        </activity>

        <service android:name="com.temix.application.taximetro.taximeter.GeofenceTransitionsIntentService" />


</application>

**和Gradle文件:

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId 'com.temix.application.taximetro'
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 5
        versionName "1.0.4"
        multiDexEnabled true

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
        }
    }
    dexOptions {
        incremental true
        javaMaxHeapSize "4g"
    }
    productFlavors {
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/Parse-1.9.4.jar')
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    compile files('libs/KiipSDK.jar')
    compile project(':tutorial_view')
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.google.android.gms:play-services:8.1.0'
    compile 'com.android.support:recyclerview-v7:22.2.1'
    compile 'com.android.support:cardview-v7:22.2.1'
    compile 'com.android.support:design:22.2.1'
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'
    compile 'com.parse.bolts:bolts-android:1.2.0'
    compile 'com.android.support:support-v4:22.2.1'
}

这里也是完整的logCat控制台日志:

2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9375 (common_google_play_services_updating_text) in Lcom/google/android/gms/R$string;
02-07 11:25:07.530 2487-2487/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x24a0 at 0x2e in Lcom/google/android/gms/common/GoogleApiAvailability;.zza
02-07 11:25:07.540 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9369 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
02-07 11:25:07.540 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9366 (common_google_play_services_notification_ticker) in Lcom/google/android/gms/R$string;
02-07 11:25:07.540 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9341 (common_ic_googleplayservices) in Lcom/google/android/gms/R$drawable;
02-07 11:25:07.540 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9366 (common_google_play_services_notification_ticker) in Lcom/google/android/gms/R$string;
02-07 11:25:07.550 2487-2487/com.temix.application.taximetro I/dalvikvm: Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzj
02-07 11:25:07.550 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve virtual method 599: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
02-07 11:25:07.550 2487-2487/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x247c at 0x6c in Lcom/google/android/gms/common/GooglePlayServicesUtil;.zza
02-07 11:25:07.550 2487-2487/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x24a1 at 0x6e in Lcom/google/android/gms/common/GooglePlayServicesUtil;.zza
02-07 11:25:07.580 2487-2515/com.temix.application.taximetro I/GMPM: App measurement is starting up
02-07 11:25:07.590 2487-2515/com.temix.application.taximetro E/GMPM: getGoogleAppId failed with status: 10
02-07 11:25:07.590 2487-2515/com.temix.application.taximetro E/GMPM: Uploading is not possible. App measurement disabled
02-07 11:25:07.710 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4360 (abc_dialog_title_material) in Landroid/support/v7/appcompat/R$layout;
02-07 11:25:07.710 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4219 (actionBarTheme) in Landroid/support/v7/appcompat/R$attr;
02-07 11:25:07.710 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4368 (abc_screen_simple_overlay_action_mode) in Landroid/support/v7/appcompat/R$layout;
02-07 11:25:07.710 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4367 (abc_screen_simple) in Landroid/support/v7/appcompat/R$layout;
02-07 11:25:07.710 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4348 (title) in Landroid/support/v7/appcompat/R$id;
02-07 11:25:07.710 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4304 (action_bar_activity_content) in Landroid/support/v7/appcompat/R$id;
02-07 11:25:07.710 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4219 (actionBarTheme) in Landroid/support/v7/appcompat/R$attr;
02-07 11:25:07.720 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4258 (abc_input_method_navigation_guard) in Landroid/support/v7/appcompat/R$color;
02-07 11:25:07.720 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4219 (actionBarTheme) in Landroid/support/v7/appcompat/R$attr;
02-07 11:25:07.720 2487-2487/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4310 (action_mode_bar_stub) in Landroid/support/v7/appcompat/R$id;
02-07 11:25:07.730 2487-2487/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x1111 at 0x57 in Landroid/support/v7/app/AppCompatDelegateImplV7;.ensureSubDecor
02-07 11:25:07.730 2487-2487/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x10e0 at 0x63 in Landroid/support/v7/app/AppCompatDelegateImplV7;.ensureSubDecor
02-07 11:25:07.730 2487-2487/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x107c at 0x34 in Landroid/support/v7/app/AppCompatDelegateImplV7;.initializePanelMenu
02-07 11:25:07.730 2487-2487/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x107c at 0x6b in Landroid/support/v7/app/AppCompatDelegateImplV7;.initializePanelMenu
02-07 11:25:07.730 2487-2487/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x107e at 0x7d in Landroid/support/v7/app/AppCompatDelegateImplV7;.startSupportActionModeFromWindow
02-07 11:25:07.730 2487-2487/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x1076 at 0x95 in Landroid/support/v7/app/AppCompatDelegateImplV7;.startSupportActionModeFromWindow
02-07 11:25:07.740 2487-2487/com.temix.application.taximetro W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x418b8c50)
02-07 11:27:47.070 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9110 (common_google_play_services_updating_text) in Lcom/google/android/gms/R$string;
02-07 11:27:47.070 4390-4390/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x2397 at 0x2e in Lcom/google/android/gms/common/GoogleApiAvailability;.zza
02-07 11:27:47.070 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9104 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
02-07 11:27:47.070 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9101 (common_google_play_services_notification_ticker) in Lcom/google/android/gms/R$string;
02-07 11:27:47.070 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9074 (common_ic_googleplayservices) in Lcom/google/android/gms/R$drawable;
02-07 11:27:47.080 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9101 (common_google_play_services_notification_ticker) in Lcom/google/android/gms/R$string;
02-07 11:27:47.080 4390-4390/com.temix.application.taximetro I/dalvikvm: Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh
02-07 11:27:47.080 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve virtual method 518: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
02-07 11:27:47.080 4390-4390/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x236d at 0x6c in Lcom/google/android/gms/common/GooglePlayServicesUtil;.zza
02-07 11:27:47.080 4390-4390/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x2398 at 0x6e in Lcom/google/android/gms/common/GooglePlayServicesUtil;.zza
02-07 11:27:47.120 4390-4422/com.temix.application.taximetro I/GMPM: App measurement is starting up
02-07 11:27:47.120 4390-4422/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 9104 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
02-07 11:27:47.120 4390-4422/com.temix.application.taximetro E/GMPM: Task exception on worker thread: java.lang.NoClassDefFoundError: com.google.android.gms.R$string: com.google.android.gms.measurement.zza.<init>(Unknown Source)
02-07 11:27:47.290 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4108 (abc_dialog_title_material) in Landroid/support/v7/appcompat/R$layout;
02-07 11:27:47.290 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 3967 (actionBarTheme) in Landroid/support/v7/appcompat/R$attr;
02-07 11:27:47.290 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4116 (abc_screen_simple_overlay_action_mode) in Landroid/support/v7/appcompat/R$layout;
02-07 11:27:47.290 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4115 (abc_screen_simple) in Landroid/support/v7/appcompat/R$layout;
02-07 11:27:47.290 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4096 (title) in Landroid/support/v7/appcompat/R$id;
02-07 11:27:47.290 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4052 (action_bar_activity_content) in Landroid/support/v7/appcompat/R$id;
02-07 11:27:47.290 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 3967 (actionBarTheme) in Landroid/support/v7/appcompat/R$attr;
02-07 11:27:47.300 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4006 (abc_input_method_navigation_guard) in Landroid/support/v7/appcompat/R$color;
02-07 11:27:47.310 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 3967 (actionBarTheme) in Landroid/support/v7/appcompat/R$attr;
02-07 11:27:47.310 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static field 4058 (action_mode_bar_stub) in Landroid/support/v7/appcompat/R$id;
02-07 11:27:47.310 4390-4390/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x1015 at 0x57 in Landroid/support/v7/app/AppCompatDelegateImplV7;.ensureSubDecor
02-07 11:27:47.310 4390-4390/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x0fe4 at 0x63 in Landroid/support/v7/app/AppCompatDelegateImplV7;.ensureSubDecor
02-07 11:27:47.310 4390-4390/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x0f80 at 0x34 in Landroid/support/v7/app/AppCompatDelegateImplV7;.initializePanelMenu
02-07 11:27:47.310 4390-4390/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x0f80 at 0x6b in Landroid/support/v7/app/AppCompatDelegateImplV7;.initializePanelMenu
02-07 11:27:47.310 4390-4390/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x0f82 at 0x7d in Landroid/support/v7/app/AppCompatDelegateImplV7;.startSupportActionModeFromWindow
02-07 11:27:47.310 4390-4390/com.temix.application.taximetro I/dalvikvm: DexOpt: unable to optimize static field ref 0x0f7a at 0x95 in Landroid/support/v7/app/AppCompatDelegateImplV7;.startSupportActionModeFromWindow
02-07 11:27:47.320 4390-4390/com.temix.application.taximetro I/dalvikvm: Could not find method android.support.v4.app.NavUtilsJB.getParentActivityIntent, referenced from method android.support.v4.app.NavUtils$NavUtilsImplJB.getParentActivityIntent
02-07 11:27:47.320 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static method 3646: Landroid/support/v4/app/NavUtilsJB;.getParentActivityIntent (Landroid/app/Activity;)Landroid/content/Intent;
02-07 11:27:47.320 4390-4390/com.temix.application.taximetro I/dalvikvm: Could not find method android.support.v4.app.NavUtilsJB.getParentActivityName, referenced from method android.support.v4.app.NavUtils$NavUtilsImplJB.getParentActivityName
02-07 11:27:47.320 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static method 3647: Landroid/support/v4/app/NavUtilsJB;.getParentActivityName (Landroid/content/pm/ActivityInfo;)Ljava/lang/String;
02-07 11:27:47.320 4390-4390/com.temix.application.taximetro I/dalvikvm: Could not find method android.support.v4.app.NavUtilsJB.navigateUpTo, referenced from method android.support.v4.app.NavUtils$NavUtilsImplJB.navigateUpTo
02-07 11:27:47.320 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static method 3648: Landroid/support/v4/app/NavUtilsJB;.navigateUpTo (Landroid/app/Activity;Landroid/content/Intent;)V
02-07 11:27:47.320 4390-4390/com.temix.application.taximetro I/dalvikvm: Could not find method android.support.v4.app.NavUtilsJB.shouldUpRecreateTask, referenced from method android.support.v4.app.NavUtils$NavUtilsImplJB.shouldUpRecreateTask
02-07 11:27:47.320 4390-4390/com.temix.application.taximetro W/dalvikvm: VFY: unable to resolve static method 3649: Landroid/support/v4/app/NavUtilsJB;.shouldUpRecreateTask (Landroid/app/Activity;Landroid/content/Intent;)Z
02-07 11:27:47.320 4390-4390/com.temix.application.taximetro W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x418b8c50)

0 个答案:

没有答案