【发布时间】:2015-02-04 16:00:40
【问题描述】:
我知道这已被多次提及,但我注意到以前没有提到的奇怪事情。事实上,当应用程序部署到设备上时,即使我们断开设备与电脑的连接并重新启动手机,应用程序仍然会显示“等待调试器”的消息。
当我们插入电脑,并在 IDE 中附加调试器时,应用程序开始正常运行。同样是当我们断开debugger --> app,弹出黑屏和“Waiting For Debugger”。我们可以将其迭代到无穷大。
看起来好像对调试器有一些依赖。
在清单中设置为启动器的活动:
<activity
android:name=".activities.SplashScreenActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
项目构建脚本:
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.14.4'
}
}
应用模块构建脚本:
apply plugin: 'android'
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.dot42"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':deviceList')
}
}
库模块构建脚本:
apply plugin: 'com.android.library'
android {
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion "21.1.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
}
}
dependencies {
compile 'com.android.support:support-v4:21.0.2'
}
有什么想法吗?
【问题讨论】:
标签: java android eclipse debugging android-studio