【发布时间】:2011-02-26 11:38:42
【问题描述】:
我想通过手机调试我的应用程序。如何签署我的应用程序以便我可以执行此操作?我对清单了解不多。
【问题讨论】:
-
现在正确的做法是这个:[完整解释][1][1]:stackoverflow.com/a/4580630
标签: android debugging android-manifest
我想通过手机调试我的应用程序。如何签署我的应用程序以便我可以执行此操作?我对清单了解不多。
【问题讨论】:
标签: android debugging android-manifest
对于新的 Gradle 构建系统,推荐的方法是在构建类型中分配它。
在你的应用模块的build.gradle:
android {
//...
buildTypes {
debug {
debuggable true
}
customDebuggableBuildType {
debuggable true
}
release {
debuggable false
}
}
//...
}
【讨论】:
通过将android:debuggable="true" 放入清单文件中,应用程序将进入调试模式,这意味着android 将管理有关您的应用程序的所有日志文件。但是如果应用程序将要上线或发布模式,请确保再次输入false(或删除此标签)。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
...
<application android:icon="@drawable/icon"
android:debuggable="true"
【讨论】: