I inherited a project which uses appcompat-v7:20.0.0
I'm not able to build the project, because it seems that gradle doesn't include the appcompat library while synching/building.
My dependencies in the build.gradle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.google.android.gms:play-services:+'
}
Also no play services are pulled into the project, but nine old androids is(I tried including different libraries, it seemed that everything from jcenter is downloaded) As you can see in the following screenshot:
The gradle plugin is 1.0.0 and there are no problems during synching.
Are there any known solutions to such type of problem?
EDIT 1:
Android Support Repository
Android Support Library
Google Play Services
Are all installed. However it also works for newly created projects.
EDIT 2:
The ./gradlew build
output:
Caused by: org.gradle.internal.UncheckedException: com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/stephan/Library/Android/sdk/build-tools/20.0.0/aapt package -f --no-crunch -I /Users/stephan/Library/Android/sdk/platforms/android-21/android.jar -M /Users/project-path/build/intermediates/manifests/full/flavor/beta/AndroidManifest.xml -S /Users/project-path/build/intermediates/res/flavor/beta -A /Users/project-path/build/intermediates/assets/flavor/beta -m -J /Users/project-path/build/generated/source/r/flavor/beta -F /Users/project-path/build/intermediates/res/resources-flavor-beta.ap_ --debug-mode --custom-package de.my.project -0 apk --output-text-symbols /Users/project-path/build/intermediates/symbols/flavor/beta
Error Code:
1
Output:
/Users/project-path/build/intermediates/res/flavor/beta/values/values.xml:2127: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Light.Base.Spinner'.
/Users/project-path/build/intermediates/res/flavor/beta/values-v16/values.xml:89: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Light.Base.Spinner'.
I also checked Widget.AppCompat.Light.Base.Spinner
is part of the values.xml
in appcompat-v7 20.0.0
Here are the sdk versions:
compileSdkVersion "Google Inc.:Google APIs:21"
buildToolsVersion "20.0.0"
defaultConfig {
minSdkVersion 10
targetSdkVersion 17
}
EDIT 3:
Project root build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
App build.gradle
apply plugin: 'com.android.application'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.google.android.gms:play-services:+'
}
android {
compileSdkVersion "Google Inc.:Google APIs:21"
buildToolsVersion "20.0.0"
defaultConfig {
minSdkVersion 10
targetSdkVersion 17
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
signingConfigs {
conf1 {
storeFile file("path")
storePassword ""
keyAlias ""
keyPassword ""
}
debug {
storeFile file("path")
storePassword ""
keyAlias ""
keyPassword ""
}
}
buildTypes {
debug {
zipAlignEnabled true
minifyEnabled false
proguardFile getDefaultProguardFile('proguard-android.txt')
proguardFile 'proguard-project.txt'
signingConfig signingConfigs.debug
}
release {
zipAlignEnabled true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
proguardFiles 'proguard-rules.pro'
}
beta {
initWith debug
signingConfig signingConfigs.debug
}
}
productFlavors {
flavor1 {
applicationId "de.package"
versionCode 1
versionName "1.0"
signingConfig signingConfigs.conf1
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}