Reputation: 12915
I'm using an external library SVProgressHUD in my Android studio project as a module. Everything is fine until I upgraded my Android studio to 0.5.1. It always shows the follow error message:
Error:(7, 17) package org.lcsky does not exist
Here is my settings.gradle:
include ':app',':SVProgressHUD'
My build.gradle in project folder:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
My build.gradle in SVProgressHUD module:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
}
The build.gradle in my main module:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.0.0'
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':SVProgressHUD')
}
The gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
Can anybody tell me what could be wrong? Thanks
Upvotes: 2
Views: 1008
Reputation: 12915
I solved the problem by changing the build.gradle in SVProgressHUD module:
apply plugin: 'android-library'
Previously it works (before Android 0.5.1) when I set it to:
apply plugin: 'android'
Upvotes: 4