Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
545 views
in Technique[技术] by (71.8m points)

firebase - Android App crashes on API level 19 but works fine on API above 19

My app crashes on API 19 but it is working fine on API level 21, 22 and 23. (I tested in the Firebase website).

I am posting my gradle and some screenshots.

build.gradle file

apply plugin: 'com.android.application'

//apply plugin: 'io.fabric'
//
//
//repositories {
//    maven { url 'https://maven.fabric.io/public' }
//}

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"
    defaultConfig {

        applicationId "com.example.koorosh.googlemapsample_v2"

//        defaultConfig {
//            manifestPlaceholders = [onesignal_app_id: "1d9b988f-ff34-496c-bf5c-733f80965c23",
//                                    // Project number pulled from dashboard, local value is ignored.
//                                    onesignal_google_project_number: "941112681249"]
//        }

        minSdkVersion 14
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    defaultConfig {
        multiDexEnabled true
    }

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:25.0.1'
    compile 'com.google.android.gms:play-services:9.2.1'
    compile files('libs/volley.jar')
    compile 'com.google.maps.android:android-maps-utils:0.4+'
    compile project(':toolbar')
    compile 'com.android.support:design:25.0.1'
    compile 'com.android.support:recyclerview-v7:25.0.1'
    compile 'com.mohamadamin:persianmaterialdatetimepicker:1.2.1'
    compile 'com.google.firebase:firebase-core:9.0.0'
    compile 'com.google.firebase:firebase-messaging:9.0.0'
    compile 'com.melnykov:floatingactionbutton:1.3.0'
//    compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
//        transitive = true;
//    }

//    compile 'com.onesignal:OneSignal:3.4.2@aar'
//
//    // Required for OneSignal, even if you have added FCM.
//    compile 'com.google.android.gms:play-services-gcm:9.2.1'
//
//    // Required for geotagging
//    compile "com.google.android.gms:play-services-location:9.2.1"
//
//    // play-services-analytics is only needed when using 8.1.0 or older.
//     compile 'com.google.android.gms:play-services-analytics:9.2.1'
}
apply plugin: 'com.google.gms.google-services'

The test issues from the Firebase robot test

 FATAL EXCEPTION: main
 Process: com.example.koorosh.googlemapsample_v2, PID: 6109
 java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.example.koorosh.googlemapsample_v2-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.koorosh.googlemapsample_v2-1, /vendor/lib, /system/lib]]
    at android.app.ActivityThread.installProvider(ActivityThread.java:4777)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4369)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4309)
    at android.app.ActivityThread.access$1500(ActivityThread.java:135)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5001)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.example.koorosh.googlemapsample_v2-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.koorosh.googlemapsample_v2-1, /vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
    at android.app.ActivityThread.installProvider(ActivityThread.java:4762)
    ... 12 more

The logs:

No content provider found for permission revoke: file:///data/local/tmp/app6478404563889985355.apk

07:15:41.209
dalvikvm
method Landroid/support/v7/widget/ListViewCompat;.lookForSelectablePosition incorrectly overrides package-private method with same name in Landroid/widget/ListView;

07:15:43.139
PackageManager
Unknown permission android.permission.MANAGE_ACCOUNT in package com.google.android.apps.auth.test.support

07:15:43.139
PackageManager
Not granting permission com.google.android.providers.gsf.permission.WRITE_GSERVICES to package com.google.android.apps.auth.test.support (protectionLevel=18 flags=0x8444)

07:15:43.139
PackageManager
Unknown permission com.android.smspush.WAPPUSH_MANAGER_BIND in package com.android.phone

07:15:43.139
PackageManager
Unknown permission com.android.nfc.permission.NFCEE_ADMIN in package com.google.android.apps.walletnfcrel

07:15:43.149
PackageManager
Unknown permission com.android.vending.billing.IBillingAccountService.BIND2 in package com.google.android.gsf.login

07:15:43.149
PackageManager
Unknown permission com.android.gallery3d.permission.GALLERY_PROVIDER in package com.android.bluetooth

07:15:43.149
PackageManager
Unknown permission android.permission.MMS_SEND_OUTBOX_MSG in package com.android.bluetooth

07:15:43.149
PackageManager
Not granting permission android.permission.BROADCAST_PACKAGE_REMOVED to package com.google.android.marvin.talkback (protectionLevel=2 flags=0x40c9be45)

07:15:43.149
PackageManager
Not granting permission android.permission.DEVICE_POWER to package com.google.android.deskclock (protectionLevel=2 flags=0xc8be45)

07:15:43.149
PackageManager
Unknown permission android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.MANAGE_SOUND_TRIGGER in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.RECOVERY in package com.google.android.gms

07:15:43.149
PackageManager
Not granting permission android.permission.READ_DREAM_STATE to package com.google.android.gms (protectionLevel=2 flags=0x40c83ec5)

07:15:43.149
PackageManager
Unknown permission android.permission.PROVIDE_TRUST_AGENT in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission com.google.android.apps.enterprise.dmagent.permission.AutoSyncPermission in package com.google.android.gms

07:15:43.149
PackageManager
Not granting permission android.permission.READ_PRIVILEGED_PHONE_STATE to package com.google.android.gms (protectionLevel=18 flags=0x40c83ec5)

07:15:43.149
PackageManager
Unknown permission android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.USE_FINGERPRINT in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.SEND_SMS_NO_CONFIRMATION in package com.google.android.gms

07:15:43.149
PackageManager
Not granting permission android.permission.PACKAGE_USAGE_STATS to package com.google.android.gms (protectionLevel=18 flags=0x40c83ec5)

07:15:43.149
PackageManager
Unknown permission com.google.android.googlequicksearchbox.permission.PAUSE_HOTWORD in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.MANAGE_VOICE_KEYPHRASES in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.TETHER_PRIVILEGED in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.REAL_GET_TASKS in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.READ_OEM_UNLOCK_STATE in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.SCORE_NETWORKS in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.OVERRIDE_WIFI_CONFIG in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.CONTROL_INCALL_EXPERIENCE in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.USER_ACTIVITY in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.MODIFY_AUDIO_ROUTING in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission com.google.android.wearable.READ_SETTINGS in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.INTENT_FILTER_VERIFICATION_AGENT in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.LOCAL_MAC_ADDRESS in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.READ_WIFI_CREDENTIAL in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.BODY_SENSORS in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission com.google.android.launcher.permission.RECEIVE_LAUNCH_BROADCASTS in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.NOTIFY_PENDING_SYSTEM_UPDATE in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission com.google.android.vending.verifier.ACCESS_VERIFIER in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission com.android.voicemail.permission.READ_VOICEMAIL in package com.google.android.gms

07:15:43.149
PackageManager
Unknown permission android.permission.READ_OWNER_DATA in package com.google.android.setupwizard

07:15:43.149
PackageManager
Unknown permission android.permission.WRITE_OWNER_DATA in package com.google.android.setupwizard

07:15:43.149
PackageManager
Unknown permission com.android.launcher.permission.READ_SETTINGS in package com.android.settings

07:15:43.149
PackageManager
Unknown permission com.android.launcher.permission.WRITE_SETTINGS in package com.android.settings

07:15:43.149
PackageManager
Unknown permission com.sprint.internal.permission.SYSTEMPROPERTIES in package com.redbend.vdmc

07:15:43.149
PackageManager
Unknown permission com.sprint.internal.permission.SYSTEMPROPERTIES_WRITE in package com.redbend.vdmc

07:15:43.149
PackageManager
Unknown permission com.sprint.internal.permission.CONNECTIONMANAGER in package com.redbend.vdmc

Please check this too:

robot test result

This is the last clue:

<img src="https://i.stack.imgur.com/ltRQo.png" alt="https://storage.cloud.google.com/test-lab-vpxbf1ki2h4t8-yy3w5d2vcbxum/web-build_2017-01-02T13:31:31.316Z_VkQZ/hammerhead-19-en_US-portrait/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...