简体   繁体   English

我在Android设备上手动安装app-debug.apk时会崩溃

[英]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- 所以总结一下

  1. Uninstall previous app 卸载以前的应用
  2. Check for version conflicts 检查版本冲突
  3. Avoid sharing apk through whatsapp 避免通过WhatsApp共享APK
  4. Clean project 清洁项目
  5. Build Apk and then distribute 建立Apk,然后分发
  6. Build signed Apk and then try installing(Recommended) 生成签名的Apk,然后尝试安装(推荐)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 app-debug.apk 安装在我的设备上 - using the app-debug.apk to install on my device 运行 react-native run-android 时无法在物理设备上安装调试 APK - 无法解析 APK 文件:/data/local/tmp/app-debug.apk - Unable to install debug APK on physical device when running react-native run-android - Failed to parse APK file: /data/local/tmp/app-debug.apk 为什么我的APK文件显示app-debug.apk? 如何重命名? - Why does my APK file say app-debug.apk? How do I rename it? Ionic cordova build android –prod –release 只构建一个调试apk (app-debug.apk) - Ionic cordova build android –prod –release only builds a debug apk (app-debug.apk) React native:安装app-debug.apk - React native: Installing app-debug.apk app-debug.apk在磁盘上不存在 - app-debug.apk does not exist on disk 是app-debug.apk应用程序的实际大小吗? - is app-debug.apk the application actual size? app-debug.apk在磁盘上不存在。 安装APK时出错 - app-debug.apk does not exist on disk. Error while Installing APK 如何告诉android testrunner测试由生成的app-debug.apk插入的external.apk? - How to tell android testrunner to test external.apk insted of generated app-debug.apk? Android Studio:从 Run 'app' 安装的应用程序和从 build/outputs/apk/debug/app-debug.apk 安装的应用程序是不同的 - Android Studio: The application installed from Run 'app' and application installed from build/outputs/apk/debug/app-debug.apk are different
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM