我开发自己的库模块,我使用Snackbar.
这是我的Gradle文件:
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'],dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'me.zhanghai.android.materialprogressbar:library:1.1.4'
compile 'com.android.support:design:23.1.1'
}
你可以看到,我已经添加了import com.android.support:design:23.1.1,但结果我得到错误:
error: package android.support.design.R does not exist
如何解决这个问题?