Android studio 3.0 - 无法运行应用

时间:2017-07-14 23:06:58

标签: android android-studio

到目前为止,我只在我的工作中使用计算机,今天我试图在我的家用电脑上设置我的项目但到目前为止没有运气。

我想它必须使用gradle配置或android studio 3.0,但两台计算机的设置相同,我没有错误,但无法点击运行按钮,添加运行配置也不起作用。

我的傻瓜:

    buildscript {
    repositories {
        mavenCentral()
        jcenter()
        mavenLocal()
        maven { url 'https://maven.google.com' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-alpha6'
        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url 'https://maven.google.com' }
        maven { url "https://jitpack.io" }
        maven { url 'http://github.com/wada811/Android-Material-Design-Colors/raw/master/repository/' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

1 个答案:

答案 0 :(得分:0)

我不知道这是否会有所帮助,但我的gradle.build是我的应用程序。也许尝试使用我的?或者你的android工作室升级,我知道早期的有bug。新版本似乎总是运行得更顺畅

// 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.3.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
}

相关问题