Reputation: 302
I'm new to android development I hope somebody can help me.
I created an app (minimum Android 4.4) using Android Studio which successfully runs on the Android Studio Emulator, MEmu Emulator and Samsung Galaxy J2 Prime mobile phone.
The problem is it shows an error Package installer keeps stopping
if I try to install it to Samsung Galaxy S7 edge (Android 7) and some local phone (Android 4.4).
The is no error on the Android Studio. I also tried building the .apk
again but there's no luck.
This is the logcat
android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
D/MediaPlayer: getMetadata
W/MediaPlayer: info/warning (3, 0)
I/Choreographer: Skipped 90 frames! The application may be doing too much work on its main thread.
I/Choreographer: Skipped 33 frames! The application may be doing too much work on its main thread.
Upvotes: 1
Views: 9995
Reputation: 77
I had the same issue as Md.Abdul Halim Rafi. Details below.
The dimensions on my custom icon were too large (>1600x1600). I reduced the same image to < 500x500 using online image reducer (Google around for one). Redid the build for the debug apk and installed it. I can now install, run, and uninstall the app again.
Upvotes: 2
Reputation: 1980
I had the same issue, but in my case after generating signed APK, it could be installed in some phones and not in others. So, my mistake was a logo size was 2400x2400 (too big). I reduced the size (to under 600 px) and now it works on every phone.
Upvotes: 5
Reputation: 361
If your app crashes with message "Unfortunately... stopped working", then do not press OK to eliminate the message, let it be on the screen. Now , check the logcat in android studio , and it will be displaying the cause of error. (Which type of error in which file and on which method). That should help you find the reason for the crash.
Upvotes: 1