[英]app-debug.apk is crashing while I install it manually on my Android device
My app is running fine on Android device when I run project from Android studio. 当我从Android Studio运行项目时,我的应用在Android设备上运行正常。 But when I install app-debug.apk manually on my device then app is crashing on starting.
但是,当我在设备上手动安装app-debug.apk时,应用程序在启动时崩溃。 And app-debug-unaligned.apk is not generating.
而且app-debug-unaligned.apk不会生成。 Kindly give any solution, Thanks in advance.
请给任何解决方案,在此先感谢。
Delete debug.apk
from output folder under build in app. 从内置应用程序下的输出文件夹中删除
debug.apk
。 and generate again and install . 并再次生成并安装。
我通过取消选中Android Studio中“设置”的即时运行解决了此问题。
First install your apk in your mobile and then try using the app. 首先在您的手机中安装apk,然后尝试使用该应用。 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.
执行该点击并检查android监视器是否存在错误,然后根据您的错误继续解决。
For me it worked when i have given public modifier to onclick methods 对我来说,当我为onclick方法提供了公共修饰符时,它就起作用了
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.
另外,如果您使用whatsapp共享apk,则可能无法正确安装apk。 And lastly improper build can also cause the issue.
最后,不正确的构建也会导致此问题。 So to sum up-
所以总结一下
- Uninstall previous app
卸载以前的应用
- Check for version conflicts
检查版本冲突
- Avoid sharing apk through whatsapp
避免通过WhatsApp共享APK
- Clean project
清洁项目
- Build Apk and then distribute
建立Apk,然后分发
- Build signed Apk and then try installing(Recommended)
生成签名的Apk,然后尝试安装(推荐)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.