刚刚下载 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'
}
答案 0 :(得分:1)
尝试删除该行:
testCompile 'junit:junit:4.12'