app-debug.apk is crashing while I install it manually on my Android device

こ雲淡風輕ζ 提交于 2019-12-14 00:49:20

问题


My app is running fine on Android device when I run project from Android studio. But when I install app-debug.apk manually on my device then app is crashing on starting. And app-debug-unaligned.apk is not generating. Kindly give any solution, Thanks in advance.


回答1:


Delete debug.apk from output folder under build in app. and generate again and install .




回答2:


I resolved this issue by unchecking instant run from Settings in android Studio.




回答3:


First install your apk in your mobile and then try using the app. The app gets crashed on some click event. perform that click and check the android monitor for error and proceed resolving based on ur error.

For me it worked when i have given public modifier to onclick methods




回答4:


Mostly the issue comes due to presence of older application with same package name or different version number. Also, if you are sharing the apk using whatsapp, its likely to happen that apk wont install properly. And lastly improper build can also cause the issue. So to sum up-

  1. Uninstall previous app
  2. Check for version conflicts
  3. Avoid sharing apk through whatsapp
  4. Clean project
  5. Build Apk and then distribute
  6. Build signed Apk and then try installing(Recommended)


来源:https://stackoverflow.com/questions/43109596/app-debug-apk-is-crashing-while-i-install-it-manually-on-my-android-device

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!