'Why does my app crash when downloading from playstore, but runs smoothly when using apk-debug.apk?
Hello maybe this is a question that has been asked a lot in this forum, I've read all the related questions but couldn't find a question with the same log as my case.
My app when run using app-debug.apk or run directly from android studio will run normally. But when the application is downloaded from the Playstore, the application will crash immediately.
This is the application log downloaded from playstore:
2022-02-19 22:36:28.928 2092-26101/? E/pageboostd: alp start : app xyzsemogajp
2022-02-19 22:36:28.931 1253-1486/? E/ActivityTaskManager: TouchDown intent received, starting ActiveLaunch
2022-02-19 22:36:28.938 2092-26101/? E/pageboostd: xyzsemogajp, amt 1511424 scnt 4 fcnt 4
2022-02-19 22:36:28.939 2092-26101/? E/pageboostd: xyzsemogajp, amt 2466168 scnt 2 fcnt 0
2022-02-19 22:36:28.939 2092-26101/? E/pageboostd: alp end : app xyzsemogajp data_amount 3977592
2022-02-19 22:36:28.971 25634-25634/? E/xyz.semogajp: Not starting debugger since process cannot load the jdwp agent.
2022-02-19 22:36:29.008 2092-2092/? E/pageboostd: Received HALT command code 2
2022-02-19 22:36:29.135 2092-2092/? E/pageboostd: Received HALT command code 2
2022-02-19 22:36:29.158 1253-1458/? E/PkgPredictorService-Collector: record changed bt=0 wifi=0 screen=0
2022-02-19 22:36:29.435 25634-26129/? E/ion: ioctl c0044901 failed with code -1: Invalid argument
2022-02-19 22:36:29.468 621-694/? E/HYPER-HAL: [Request.cpp]acquire(): Request:: id : 803292, No Resource to set
2022-02-19 22:36:29.475 2092-2092/? E/pageboostd: Received HALT command code 2
2022-02-19 22:36:29.504 1253-3568/? E/WindowManager: win=Window{35d70e6 u0 com.sec.android.app.launcher/com.sec.android.app.launcher.activities.LauncherActivity} destroySurfaces: appStopped=true win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8 caller=com.android.server.wm.ActivityRecord.destroySurfaces:5248 com.android.server.wm.ActivityRecord.destroySurfaces:5229 com.android.server.wm.ActivityRecord.notifyAppStopped:5288 com.android.server.wm.ActivityRecord.activityStopped:5915 com.android.server.wm.ActivityTaskManagerService.activityStopped:2503 android.app.IActivityTaskManager$Stub.onTransact:2223 android.os.Binder.execTransactInternal:1190
2022-02-19 22:36:29.549 1253-1274/? E/WindowManager: win=Window{57632b2 u0 Splash Screen xyz.semogajp EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.ActivityRecord.destroySurfaces:5248 com.android.server.wm.ActivityRecord.destroySurfaces:5229 com.android.server.wm.WindowState.onExitAnimationDone:5623 com.android.server.wm.WindowStateAnimator.onAnimationFinished:332 com.android.server.wm.WindowState.onAnimationFinished:6088 com.android.server.wm.-$$Lambda$dwJG8BAnLlvKNGuDY9U3-haNY4M.onAnimationFinished:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0$SurfaceAnimator:112
2022-02-19 22:36:32.637 600-901/? E/Netd: getNetworkForDns: getNetId from enterpriseCtrl is netid 0
2022-02-19 22:36:32.640 600-26153/? E/Netd: To use pid in case SEC_PRODUCT_FEATURE_KNOX_SUPPORT_NPA is false, to remove build error (unused variable)
2022-02-19 22:36:32.993 25634-25634/? E/RecyclerView: No adapter attached; skipping layout
2022-02-19 22:36:33.212 2092-2092/? E/pageboostd: Received HALT command code 2
2022-02-19 22:36:33.261 25634-25634/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: xyz.semogajp, PID: 25634
java.lang.NullPointerException
at t4.a.a(:2)
at a6.h.run(:3)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8633)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
2022-02-19 22:36:33.357 1758-1758/? E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
2022-02-19 22:36:33.359 1758-1758/? E/PackageLaunchUtils: getVersionCode:android.content.pm.PackageManager$NameNotFoundException: com.samsung.android.themestore
2022-02-19 22:36:33.360 1758-1758/? E/PackageLaunchUtils: com.samsung.android.themestore is not installed
2022-02-19 22:36:33.365 1758-1758/? E/PackageLaunchUtils: getVersionCode:android.content.pm.PackageManager$NameNotFoundException: com.samsung.android.themestore
2022-02-19 22:36:33.367 1758-1758/? E/PackageLaunchUtils: com.samsung.android.themestore is not installed
2022-02-19 22:36:33.377 2092-2092/? E/pageboostd: Received HALT command code 2
2022-02-19 22:36:33.440 1758-1758/? E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
2022-02-19 22:36:33.474 621-694/? E/HYPER-HAL: [Request.cpp]acquire(): Request:: id : 803292, No Resource to set
2022-02-19 22:36:33.632 1253-1274/? E/WindowManager: win=Window{83015dc u0 xyz.semogajp/io.github.aerhakim.keluaranhktop.activity.SplashScreenActivity EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.ActivityRecord.destroySurfaces:5248 com.android.server.wm.ActivityRecord.destroySurfaces:5229 com.android.server.wm.WindowState.onExitAnimationDone:5623 com.android.server.wm.-$$Lambda$01bPtngJg5AqEoOWfW3rWfV7MH4.accept:2 java.util.ArrayList.forEach:1262 com.android.server.wm.ActivityRecord.onAnimationFinished:7159 com.android.server.wm.-$$Lambda$dwJG8BAnLlvKNGuDY9U3-haNY4M.onAnimationFinished:2
2022-02-19 22:36:33.637 1253-1274/? E/WindowManager: win=Window{130491a u0 xyz.semogajp/io.github.aerhakim.keluaranhktop.activity.MainActivity EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.ActivityRecord.destroySurfaces:5248 com.android.server.wm.ActivityRecord.destroySurfaces:5229 com.android.server.wm.WindowState.onExitAnimationDone:5623 com.android.server.wm.-$$Lambda$01bPtngJg5AqEoOWfW3rWfV7MH4.accept:2 java.util.ArrayList.forEach:1262 com.android.server.wm.ActivityRecord.onAnimationFinished:7159 com.android.server.wm.-$$Lambda$dwJG8BAnLlvKNGuDY9U3-haNY4M.onAnimationFinished:2
this is my build.gradle file:
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdk 31
defaultConfig {
applicationId "xyz.semogajp"
minSdk 16
targetSdk 31
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.navigation:navigation-fragment:2.3.0'
implementation 'androidx.navigation:navigation-ui:2.3.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//firebase
implementation 'com.google.firebase:firebase-messaging:21.0.1'
//image
implementation 'com.makeramen:roundedimageview:2.3.0'
//cardview
implementation 'androidx.cardview:cardview:1.0.0'
// retrofit, gson
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'
//retrofit logger
implementation "com.squareup.okhttp3:logging-interceptor:4.4.0"
//select effect
implementation 'com.balysv:material-ripple:1.0.2'
//Shimmer
implementation 'com.facebook.shimmer:shimmer:0.5.0'
//Image Loading
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
//Atur size text dan gambar
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
implementation 'androidx.multidex:multidex:2.0.1'
}
If anyone has a solution or a reference to solve my problem, please help answer this question.
Thank You
EDIT I've solved this problem, it's probably caused by ProGuard.
It's possible that there are some unreadable classes when activating ProGuard. When I deactivated it, the application was able to run normally.
I'm still looking for a way to solve the ProGuard problem, you can use this link for reference. https://www.guardsquare.com/blog/configuring-proguard-an-easy-step-by-step-tutorial
But for now, I will disable ProGuard to meet the deadline.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
