我在 android studio 中使用 cruton 库作为 toast 消息的选项。
我已经按照https://github.com/keyboardsurfer/Crouton链接上的自述文件包含了代码。但是我不断收到错误插件,因为找不到android:id=maven 。
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.firstclicker.bengaliclicker"
minSdkVersion 14
targetSdkVersion 19
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
buildscript {
repositories {
mavenCentral()
}
}
repositories {
mavenCentral()
}
}
dependencies {
compile 'com.android.support:support-v4:19.1.+'
compile 'com.google.android.gms:play-services:+'
compile files('libs/crouton-1.8.2.jar')
compile files('libs/picasso-2.5.2.jar')
compile('de.keyboardsurfer.android.widget:crouton:1.8.5@aar') {
// exclusion is not necessary, but generally a good idea.
exclude group: 'com.google.android', module: 'support-v4'
}
}
依赖项被插入到 build.gradle 文件中。即使错误仍然存在,即“找不到带有 id 'android-maven' 的错误(17,0)插件