这是build.gradle项目
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.natalia.ministerioproyecto"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
sourceSets
{
main
{
res.srcDirs =
[
'/src/main/res/layout/Polo azul/Formulario Dinara'
]
}
}
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:23.4.0'
classpath 'com.android.support:appcompat-v7:23.4.0'
}
和thi是模块:app
apply plugin:'com.android.application'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
答案 0 :(得分:0)
Gradle文件错误。
build.gradle项目
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
<强>模块:应用
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.natalia.ministerioproyecto"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
sourceSets
{
main
{
res.srcDirs =
[
'/src/main/res/layout/Polo azul/Formulario Dinara'
]
}
}
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:23.4.0'
classpath 'com.android.support:appcompat-v7:23.4.0'
}