简体   繁体   中英

android app doesnt install in version 9 and above

Good day all, pls the app that i created doesnt work on android versions 9, 10 and 11..

I tested the app on lower versions and it worked perfectly but when tested on version 9, 10 or 11, the app keeps crashing

I really appreciate if my question is answered. Thanks

Below is my build.gradle file

plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}


compileSdkVersion 30
buildToolsVersion "30.0.2"

defaultConfig {
    applicationId "com.example.myrevisedlawcoursesapp300level"
    minSdkVersion 19
    targetSdkVersion 30
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    signingConfig signingConfigs.release
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.release

    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

`}

`dependencies {

implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.android.support:multidex:2.0.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-ads:19.7.0'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

}`

the error messages in my logcat. I dnt see any clues from it tho

02-13 07:21:45.075 308-308/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_01
02-13 07:22:09.934 30407-30420/? A/libc: Fatal signal 7 (SIGBUS), code 1, fault addr 0xc0011 in tid 30420 (Compiler driver)

02-13 07:22:10.038 308-308/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 02-13 07:22:10.039 308-308/? A/DEBUG: Build fingerprint: 'TCL/5056I/POP455C:6.0.1/MMB29M/vHAJ9-0:user/release-keys' 02-13 07:22:10.039 308-308/? A/DEBUG: Revision: '0' 02-13 07:22:10.039 308-308/? A/DEBUG: ABI: 'arm' 02-13 07:22:10.039 308-308/? A/DEBUG: pid: 30407, tid: 30420, name: Compiler driver >>> /system/bin/dex2oat <<< 02-13 07:22:10.039 308-308/? A/DEBUG: signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xc0011 02-13 07:22:10.051 308-308/? A/DEBUG: r0 b1c6004c r1 ffff0006 r2 000c0001 r3 ffff0006 02-13 07:22:10.051 308-308/? A/DEBUG: r4 b1c45638 r5 b1c639ec r6 b1c63af0 r7 00250000 02-13 07:22:10.051 308-308/? A/DEBUG: r8 b1c63958 r9 ffffffff sl b1c63950 fp b1c6395c 02-13 07:22:10.051 308-308/? A/DEBUG: ip b1e522f6 sp b1e522e8 lr b1c60a18 pc b6c56904 cpsr 20070030 02-13 07:22:10.087 308-308/? A/DEBUG: backtrace: 02-13 07:22:10.087 308-308/? A/DEBUG: #00 pc 000e7904 /system/lib/libart-compiler.so (_ZN3art19LocalValueNumbering16HandleInvokeArgsEPKNS_3MIREPKS0_+199) 02-13 07:22:10.087 308-308/? A/DEBUG: #01 pc 000eac3d /system/lib/libart-compiler.so (_ZN3art19LocalValueNumbering14GetValueNumberEPNS_3MIRE+608) 02-13 07:22:10.088 308-308/? A/DEBUG: #02 pc 001badb3 /system/lib/libart-compiler.so (_ZN3art8MIRGraph28ApplyGlobalValueNumberingEndEv+186) 02-13 07:22:10.088 308-308/? A/DEBUG: #03 pc 001bcd9b /system/lib/libart-compiler.so (_ZN3art16PassDriverMEOpts9ApplyPassEPNS_14PassDataHolderEPKNS_4PassE+38) 02-13 07:22:10.088 308-308/? A/DEBUG: #04 pc 0016ecbb /system/lib/libart-compiler.so 02-13 07:22:10.088 308-308/? A/DEBUG: #05 pc 0016f4e7 /system/lib/libart-compiler.so (_ZNK3art13QuickCompiler7CompileEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS1_+1390) 02-13 07:22:10.088 308-308/? A/DEBUG: #06 pc 0031ed97 /system/lib/libart-compiler.so (_ZN3art14TryFastCompileEPNS_14CompilerDriverEPNS_8CompilerEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS4_+166) 02-13 07:22:10.088 308-308/? A/DEBUG: #07 pc 0025e279 /system/lib/libart-compiler.so (_ZNK3art18OptimizingCompiler7CompileEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS1_+180) 02-13 07:22:10.088 308-308/? A/DEBUG: #08 pc 001cb7ef /system/lib/libart-compiler.so (_ZN3art14CompilerDriver13CompileMethodEPNS_6ThreadEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS3_NS_24DexToDexCompilationLevelEb+1818) 02-13 07:22:10.088 308-308/? A/DEBUG: #09 pc 001cc49b /system/lib/libart-compiler.so (_ZN3art14CompilerDriver12CompileClassEPKNS_26ParallelCompilationManagerEj+1954) 02-13 07:22:10.088 308-308/? A/DEBUG: #10 pc 001c2c95 /system/lib/libart-compiler.so 02-13 07:22:10.088 308-308/? A/DEBUG: #11 pc 00347e11 /system/lib/libart.so (_ZN3art16ThreadPoolWorker3RunEv+256) 02-13 07:22:10.089 308-308/? A/DEBUG: #12 pc 00348449 /system/lib/libart.so (_ZN3art16ThreadPoolWorker8CallbackEPv+52) 02-13 07:22:10.089 308-308/? A/DEBUG: #13 pc 0004169b /system/lib/libc.so (_ZL15__pthread_startPv+30) 02-13 07:22:10.089 308-308/? A/DEBUG: #14 pc 00019275 /system/lib/libc.so (__start_thread+6) 02-13 07:22:10.366 308-308/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_09 02-13 07:22:10.039 308-308/? A/DEBUG: Build fingerprint: 'TCL/5056I/POP455C:6.0.1/MMB29M/vHAJ9-0:user/release-keys' 02-13 07:22:10.039 308-308/? A/DEBUG: Revision: '0' 02-13 07:22:10.039 308-308/? A/DEBUG: ABI: 'arm' 02-13 07:22:10.039 308-308/? A/DEBUG: pid: 30407, tid: 30420, name: Compiler driver >>> /system/bin/dex2oat <<< 02-13 07:22:10.039 308-308/? A/DEBUG: signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xc0011 02-13 07:22:10.051 308-308/? A/DEBUG: r0 b1c6004c r1 ffff0006 r2 000c0001 r3 ffff0006 02-13 07:22:10.051 308-308/? A/DEBUG: r4 b1c45638 r5 b1c639ec r6 b1c63af0 r7 00250000 02-13 07:22:10.051 308-308/? A/DEBUG: r8 b1c63958 r9 ffffffff sl b1c63950 fp b1c6395c 02-13 07:22:10.051 308-308/? A/DEBUG: ip b1e522f6 sp b1e522e8 lr b1c60a18 pc b6c56904 cpsr 20070030 02-13 07:22:10.087 308-308/? A/DEBUG: backtrace: 02-13 07:22:10.087 308-308/? A/DEBUG: #00 pc 000e7904 /system/lib/libart-compiler.so (_ZN3art19LocalValueNumbering16HandleInvokeArgsEPKNS_3MIREPKS0_+199) 02-13 07:22:10.087 308-308/? A/DEBUG: #01 pc 000eac3d /system/lib/libart-compiler.so (_ZN3art19LocalValueNumbering14GetValueNumberEPNS_3MIRE+608) 02-13 07:22:10.088 308-308/? A/DEBUG: #02 pc 001badb3 /system/lib/libart-compiler.so (_ZN3art8MIRGraph28ApplyGlobalValueNumberingEndEv+186) 02-13 07:22:10.088 308-308/? A/DEBUG: #03 pc 001bcd9b /system/lib/libart-compiler.so (_ZN3art16PassDriverMEOpts9ApplyPassEPNS_14PassDataHolderEPKNS_4PassE+38) 02-13 07:22:10.088 308-308/? A/DEBUG: #04 pc 0016ecbb /system/lib/libart-compiler.so 02-13 07:22:10.088 308-308/? A/DEBUG: #05 pc 0016f4e7 /system/lib/libart-compiler.so (_ZNK3art13QuickCompiler7CompileEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS1_+1390) 02-13 07:22:10.088 308-308/? A/DEBUG: #06 pc 0031ed97 /system/lib/libart-compiler.so (_ZN3art14TryFastCompileEPNS_14CompilerDriverEPNS_8CompilerEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS4_+166) 02-13 07:22:10.088 308-308/? A/DEBUG: #07 pc 0025e279 /system/lib/libart-compiler.so (_ZNK3art18OptimizingCompiler7CompileEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS1_+180) 02-13 07:22:10.088 308-308/? A/DEBUG: #08 pc 001cb7ef /system/lib/libart-compiler.so (_ZN3art14CompilerDriver13CompileMethodEPNS_6ThreadEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS3_NS_24DexToDexCompilationLevelEb+1818) 02-13 07:22:10.088 308-308/? A/DEBUG: #09 pc 001cc49b /system/lib/libart-compiler.so (_ZN3art14CompilerDriver12CompileClassEPKNS_26ParallelCompilationManagerEj+1954) 02-13 07:22:10.088 308-308/? A/DEBUG: #10 pc 001c2c95 /system/lib/libart-compiler.so 02-13 07:22:10.088 308-308/? A/DEBUG: #11 pc 00347e11 /system/lib/libart.so (_ZN3art16ThreadPoolWorker3RunEv+256) 02-13 07:22:10.089 308-308/? A/DEBUG: #12 pc 00348449 /system/lib/libart.so (_ZN3art16ThreadPoolWorker8CallbackEPv+52) 02-13 07:22:10.089 308-308/? A/DEBUG: #13 pc 0004169b /system/lib/libc.so (_ZL15__pthread_startPv+30) 02-13 07:22:10.089 308-308/? A/DEBUG: #14 pc 00019275 /system/lib/libc.so (__start_thread+6) 02-13 07:22:10.366 308-308/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_09 02-13 07:22:10.039 308-308/? A/DEBUG: Build fingerprint: 'TCL/5056I/POP455C:6.0.1/MMB29M/vHAJ9-0:user/release-keys' 02-13 07:22:10.039 308-308/? A/DEBUG: Revision: '0' 02-13 07:22:10.039 308-308/? A/DEBUG: ABI: 'arm' 02-13 07:22:10.039 308-308/? A/DEBUG: pid: 30407, tid: 30420, name: Compiler driver >>> /system/bin/dex2oat <<< 02-13 07:22:10.039 308-308/? A/DEBUG: signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xc0011 02-13 07:22:10.051 308-308/? A/DEBUG: r0 b1c6004c r1 ffff0006 r2 000c0001 r3 ffff0006 02-13 07:22:10.051 308-308/? A/DEBUG: r4 b1c45638 r5 b1c639ec r6 b1c63af0 r7 00250000 02-13 07:22:10.051 308-308/? A/DEBUG: r8 b1c63958 r9 ffffffff sl b1c63950 fp b1c6395c 02-13 07:22:10.051 308-308/? A/DEBUG: ip b1e522f6 sp b1e522e8 lr b1c60a18 pc b6c56904 cpsr 20070030 02-13 07:22:10.087 308-308/? A/DEBUG: backtrace: 02-13 07:22:10.087 308-308/? A/DEBUG: #00 pc 000e7904 /system/lib/libart-compiler.so (_ZN3art19LocalValueNumbering16HandleInvokeArgsEPKNS_3MIREPKS0_+199) 02-13 07:22:10.087 308-308/? A/DEBUG: #01 pc 000eac3d /system/lib/libart-compiler.so (_ZN3art19LocalValueNumbering14GetValueNumberEPNS_3MIRE+608) 02-13 07:22:10.088 308-308/? A/DEBUG: #02 pc 001badb3 /system/lib/libart-compiler.so (_ZN3art8MIRGraph28ApplyGlobalValueNumberingEndEv+186) 02-13 07:22:10.088 308-308/? A/DEBUG: #03 pc 001bcd9b /system/lib/libart-compiler.so (_ZN3art16PassDriverMEOpts9ApplyPassEPNS_14PassDataHolderEPKNS_4PassE+38) 02-13 07:22:10.088 308-308/? A/DEBUG: #04 pc 0016ecbb /system/lib/libart-compiler.so 02-13 07:22:10.088 308-308/? A/DEBUG: #05 pc 0016f4e7 /system/lib/libart-compiler.so (_ZNK3art13QuickCompiler7CompileEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS1_+1390) 02-13 07:22:10.088 308-308/? A/DEBUG: #06 pc 0031ed97 /system/lib/libart-compiler.so (_ZN3art14TryFastCompileEPNS_14CompilerDriverEPNS_8CompilerEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS4_+166) 02-13 07:22:10.088 308-308/? A/DEBUG: #07 pc 0025e279 /system/lib/libart-compiler.so (_ZNK3art18OptimizingCompiler7CompileEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS1_+180) 02-13 07:22:10.088 308-308/? A/DEBUG: #08 pc 001cb7ef /system/lib/libart-compiler.so (_ZN3art14CompilerDriver13CompileMethodEPNS_6ThreadEPKNS_7DexFile8CodeItemEjNS_10InvokeTypeEtjP8_jobjectRKS3_NS_24DexToDexCompilationLevelEb+1818) 02-13 07:22:10.088 308-308/? A/DEBUG: #09 pc 001cc49b /system/lib/libart-compiler.so (_ZN3art14CompilerDriver12CompileClassEPKNS_26ParallelCompilationManagerEj+1954) 02-13 07:22:10.088 308-308/? A/DEBUG: #10 pc 001c2c95 /system/lib/libart-compiler.so 02-13 07:22:10.088 308-308/? A/DEBUG: #11 pc 00347e11 /system/lib/libart.so (_ZN3art16ThreadPoolWorker3RunEv+256) 02-13 07:22:10.089 308-308/? A/DEBUG: #12 pc 00348449 /system/lib/libart.so (_ZN3art16ThreadPoolWorker8CallbackEPv+52) 02-13 07:22:10.089 308-308/? A/DEBUG: #13 pc 0004169b /system/lib/libc.so (_ZL15__pthread_startPv+30) 02-13 07:22:10.089 308-308/? A/DEBUG: #14 pc 00019275 /system/lib/libc.so (__start_thread+6) 02-13 07:22:10.366 308-308/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_09 02-13 09:06:16.369 8032-8032/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.tcl.antivirus, PID: 8032 java.lang.RuntimeException: Unable to start receiver com.antivirus.ui.privacy.PrivacyAlarmReceiver: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.CallLogProvider from ProcessRecord{6dab055 8032:com.tcl.antivirus/u0a88} (pid=8032, uid=10088) requires android.permission.READ_CALL_LOG or android.permission.WRITE_CALL_LOG at android.app.ActivityThread.handleReceiver(ActivityThread.java:2732) at android.app.ActivityThread.access$1800(ActivityThread.java:150) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.CallLogProvider from ProcessRecord{6dab055 8032:com.tcl.antivirus/u0a88} (pid=8032, uid=10088) requires android.permission.READ_CALL_LOG or android.permission.WRITE_CALL_LOG at android.os.Parcel.readException(Parcel.java:1620) at android.os.Parcel.readException(Parcel.java:1573) at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3572) at android.app.ActivityThread.acquireProvider(ActivityThread.java:4778) at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018) at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1471) at android.content.ContentResolver.query(ContentResolver.java:477) at android.content.ContentResolver.query(ContentResolver.java:435) at com.antivirus.ia(Unknown Source) at com.antivirus.privacy.eb(Unknown Source) at com.antivirus.privacy.ea(Unknown Source) at com.antivirus.ui.privacy.PrivacyAlarmReceiver.a(Unknown Source) at com.antivirus.ui.privacy.PrivacyAlarmReceiver.onReceive(Unknown Source) at android.app.ActivityThread.handleReceiver(ActivityThread.java:2725) at android.app.ActivityThread.access$1800(ActivityThread.java:150) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) Process: com.tcl.antivirus, PID: 8032 java.lang.RuntimeException: Unable to start receiver com.antivirus.ui.privacy.PrivacyAlarmReceiver: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.CallLogProvider from ProcessRecord{6dab055 8032:com.tcl.antivirus/u0a88} (pid=8032, uid=10088) requires android.permission.READ_CALL_LOG or android.permission.WRITE_CALL_LOG at android.app.ActivityThread.handleReceiver(ActivityThread.java:2732) at android.app.ActivityThread.access$1800(ActivityThread.java:150) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.CallLogProvider from ProcessRecord{6dab055 8032:com.tcl.antivirus/u0a88} (pid=8032, uid=10088) requires android.permission.READ_CALL_LOG or android.permission.WRITE_CALL_LOG at android.os.Parcel.readException(Parcel.java:1620) at android.os.Parcel.readException(Parcel.java:1573) at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3572) at android.app.ActivityThread.acquireProvider(ActivityThread.java:4778) at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018) at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1471) at android.content.ContentResolver.query(ContentResolver.java:477) at android.content.ContentResolver.query(ContentResolver.java:435) at com.antivirus.ia(Unknown Source) at com.antivirus.privacy.eb(Unknown Source) at com.antivirus.privacy.ea(Unknown Source) at com.antivirus.ui.privacy.PrivacyAlarmReceiver.a(Unknown Source) at com.antivirus.ui.privacy.PrivacyAlarmReceiver.onReceive(Unknown Source) at android.app.ActivityThread.handleReceiver(ActivityThread.java:2725) at android.app.ActivityThread.access$1800(ActivityThread.java:150) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method)

You have a permissions problem here, in low versions of Android, when you install the app, it guarantees all the permissions, but in the latest Android APIs, you have to request permission at runtime, if you don't and for example try read your app's storage information then your app will be crash

I tested the app directly on a phone that uses android version 9 and the error was that i added a picture to a wrong resource directory. So i changed the location of the picture from mipmap to drawable

Thanks for all ur help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM