Android 此应用程序未在其清单中启用 debuggable 属性
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25860720/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
This application does not have the debuggable attribute enabled in its manifest
提问by ishq
Cannot debug application com.domain.test on device samsung-gt_i9300-323020cfc86b804f. This application does not have the debuggable attribute enabled in its manifest. If you have manually set it in the manifest, then remove it and let the IDE automatically assign it. If you are using Gradle, make sure that your current variant is debuggable.
无法在设备 samsung-gt_i9300-323020cfc86b804f 上调试应用程序 com.domain.test。此应用程序未在其清单中启用 debuggable 属性。如果您已在清单中手动设置它,则将其删除并让 IDE 自动分配它。如果您使用 Gradle,请确保您当前的变体是可调试的。
回答by Klaus
回答by CoolMind
A right solution is written in https://stackoverflow.com/a/25628789/2914140: open build.gradle of your module, type: 'debuggable true' (an example is below):
正确的解决方案写在https://stackoverflow.com/a/25628789/2914140 中:打开模块的 build.gradle,输入:'debuggable true'(示例如下):
buildTypes {
release {
signingConfig signingConfigs.release
debuggable true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
applicationIdSuffix ".debug"
debuggable true
}
}
When you generate a signed APK from menu, you should edit 'release' branch changing 'debuggable true' to false in order to avoid a debuggable information.
当您从菜单生成签名 APK 时,您应该编辑 'release' 分支,将 'debuggable true' 更改为 false 以避免出现可调试信息。
回答by djdance
for whose came here searching TS's quote, check if you set Android Applicationin Run/Debug configuration popup. Not Native, like in my mistake.
对于来这里搜索 TS 报价的人,请检查您是否在运行/调试配置弹出窗口中设置了Android 应用程序。不是本地的,就像我的错误一样。