【发布时间】:2016-08-29 05:39:26
【问题描述】:
刚下载Android Studio 2.1.3。每次都给
error: cannot resolve symbol appcompatactivity,oncreate.Further it shows message "Error:A problem occurred configuring project ':app'.
无法下载 junit.jar (junit:junit:4.12) 无法获取资源“https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar”。 java.lang.NullPointerException(没有错误信息)” 应用插件:'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.prateek.myapplication"
minSdkVersion 23
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
}
【问题讨论】:
-
如果你不写单元测试,你可以去掉app模块的
build.gradle中的依赖。什么是“黑色活动”? -
发布 gradle 文件。
标签: java android android-studio android-gradle-plugin