【发布时间】:2016-09-17 17:52:25
【问题描述】:
Android Studio 无法开始调试我的应用。它输出消息
我的 AndroidManifest.xml 文件
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.xxx" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:debuggable="true"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="HardcodedDebugMode">
<activity android:name="com.xxx.MainContentActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.xxx.ViewerActivity" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
我的摇篮
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.xxx"
minSdkVersion 14
targetSdkVersion 23
versionCode 2
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.google.android.gms:play-services:8.4.0'
}
我尝试清理/重建 gradle 项目,重新启动 Android Studio,使缓存无效和 rebbot ADB 集成(工具 -> Android -> 禁用 ADB 集成 -> 启用 ADB 集成)
有什么想法吗?
P.S.在此之前我更改了应用程序包的名称
P.S.{2} Android Studio 无法调试其他项目。
【问题讨论】:
-
从清单应用程序标签中删除 android:debuggable="true"...从设备上卸载应用程序(如果以前安装过)...然后再试一次。
-
你说的我都做了。结果是一样的:(@ArnavM.
-
它是否在模拟器/模拟器或其他设备上工作?
-
我目前没有其他设备,也没有安装模拟器,但我注意到,Android Studio 无法调试其他项目。现在我将 AS 更新到 2.1.1 版并重试。 gragle build 进程也没有启动,当我点击图标调试时,只显示错误消息@ArnavM.
-
分享你的gradle版本、gradle-android插件版本和java版本。
标签: android xml debugging android-studio adb