首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安卓工作室不认识我的设备- LG精神4G

安卓工作室不认识我的设备- LG精神4G
EN

Stack Overflow用户
提问于 2017-01-01 19:41:17
回答 1查看 115关注 0票数 1

我启用了开发人员选项,并更新了驱动程序( OS win10说),并且我遵循了文档的说明。我的舱单:

代码语言:javascript
复制
  <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">

以及构建等级文件:

代码语言:javascript
复制
     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。它说:“我不知道这是什么意思,因为我已经做了文档上说的所有事情。我在这里讲过所有的答案,但是没有worked...Any的想法吗?链接:https://developer.android.com/studio/run/device.html

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-01-01 19:58:26

你把你的build.gradle搞砸了,它应该是这样的:

代码语言:javascript
复制
    // 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,这是您添加和修改android{} gradle clojure的文件

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41418383

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档