简体   繁体   English

IntelliJ IDEA 13.0应用程序的恒定调试模式?

[英]IntelliJ IDEA 13.0 constant debug mode for app?

I have developed an app in IntelliJ IDEA 13.0 however when I run the app on my device it constantly waits for the debugger (if I run in debug mode it's fine as the debugger connects) however if away from the computer I cannot run the app as the following message appears. 我已经在IntelliJ IDEA 13.0中开发了一个应用程序,但是当我在设备上运行该应用程序时,它会不断等待调试器(如果我在调试模式下运行,因为调试器可以正常连接),但是如果离开计算机,我将无法运行该应用程序出现以下消息。

Waiting For Debugger
Application XXXXXX
(process uk.co.xxxxx.xxxxx) is waiting for the debugger to attach
Force Close

This works when at the computer: 在计算机上工作时:

在此处输入图片说明

This never works either at the computer or when away from: 在计算机上或远离以下地点时,这永远无法工作:

在此处输入图片说明

Does anyone know why this may be? 有谁知道为什么会这样吗? Thanks in advance. 提前致谢。

Make a release (non-debug) version of the application and install it on device. 制作应用程序的发行版(非调试)并将其安装在设备上。

If you use Gradle 如果您使用Gradle

gradle assembleRelease

if you use Ant 如果您使用Ant

ant release

You will have to generate a signing key and sign your application . 您将必须生成一个签名密钥并签署您的应用程序

If you use Gradle you can make use of this build script to sign your application. 如果您使用Gradle,则可以使用此构建脚本对应用程序进行签名。

Your newly generated application will have different signing key that the old one as it used debug signing key. 新生成的应用程序将具有与旧版本使用的调试签名密钥不同的签名密钥。 First remove the old one from your device. 首先从您的设备中删除旧的。 Then install release APK file using this commands: 然后使用以下命令安装Release APK文件:

adb install APPLICATINO.apk 

我也注意到了这一点,它似乎是IntelliJ Idea 13.0中的一个错误,13.1.x似乎已经解决了这个问题。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM