小编Per*_*hua的帖子

gradle sync失败导致:java.lang.NullPointerException

今天我盯着我的Android Studio并弹出这个错误,昨天一切都很好......真的不知道出了什么问题,所以我尝试重新安装Android工作室,安装Android SDK构建工具,android SDK工具25.2.2也

救命

来自模块应用程序

apply plugin: 'com.android.application'


android {
    compileSdkVersion 23
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "oo"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
}
Run Code Online (Sandbox Code Playgroud)

来自项目

// 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'

        // …
Run Code Online (Sandbox Code Playgroud)

gradle android-studio

3
推荐指数
3
解决办法
2万
查看次数

标签 统计

android-studio ×1

gradle ×1