Edg*_*l95 7 java junit android
我已经到处寻找这个答案,并尝试了多种方法来解决这个问题,但由于我是这个IDE的新手,我需要一些帮助.
我所做的就是在android studio中创建一个空项目,在我对文件进行更改之前我无法构建并在我的消息gradle sync中不断出现7个错误.
错误:
这是我的项目'myApplication'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
这是我的构建gradle模块:app
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "test.app.stannah.com.uk"
minSdkVersion 15
targetSdkVersion 24
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'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud)
有人可以告诉我该怎么做这些错误?
问候
Man*_*ath 12
从中删除不需要的库build.gradle,
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
Run Code Online (Sandbox Code Playgroud)
并且
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
16054 次 |
| 最近记录: |