Android Studio 无法识别我的设备 - LG Spirit 4G
Android Studio doesnt recognize my device - LG Spirit 4G
我启用了开发人员选项,更新了驱动程序(说 OS win10),并且我按照文档的说明进行操作。我的清单:
<application
android:debuggable="true" //this line says it shouldnt be harcoded?
android:allowBackup="true"
android:icon="@drawable/ic_piano"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
以及构建 gradle 文件:
android {
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
android {
buildTypes {
debug {
debuggable true
}
从文档中复制的清单和构建代码。但它未能build.graddle。它说:期待'}'找到“
我不知道这是什么意思,因为我已经完成了文档中所说的一切。我已经在 SO 中搜索了所有答案,但没有任何有效的答案......有什么想法吗?
link: https://developer.android.com/studio/run/device.html
你搞砸了你的 build.gradle,它应该是这样的:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
请注意,这是您的顶级 build.gradle,它将位于您项目的根目录中。应该有 另一个 build.gradle 在一个可能叫做 /app
的文件夹里面,这是你添加和修改 android{}
gradle clojure 的文件
我启用了开发人员选项,更新了驱动程序(说 OS win10),并且我按照文档的说明进行操作。我的清单:
<application
android:debuggable="true" //this line says it shouldnt be harcoded?
android:allowBackup="true"
android:icon="@drawable/ic_piano"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
以及构建 gradle 文件:
android {
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
android {
buildTypes {
debug {
debuggable true
}
从文档中复制的清单和构建代码。但它未能build.graddle。它说:期待'}'找到“ 我不知道这是什么意思,因为我已经完成了文档中所说的一切。我已经在 SO 中搜索了所有答案,但没有任何有效的答案......有什么想法吗? link: https://developer.android.com/studio/run/device.html
你搞砸了你的 build.gradle,它应该是这样的:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
请注意,这是您的顶级 build.gradle,它将位于您项目的根目录中。应该有 另一个 build.gradle 在一个可能叫做 /app
的文件夹里面,这是你添加和修改 android{}
gradle clojure 的文件