我正在尝试让事情有效,所以我最终可以为我开发的应用程序构建apk,但我面临着这两个错误:
Error:(102, 82) error: cannot find symbol class ListCallbackSingleChoice
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
第一个错误显示在此行:.itemsCallbackSingleChoice(-1, new MaterialDialog.ListCallbackSingleChoice() {
我现在正在寻找几个小时,我什么也做不了。我该怎么办才能让它发挥作用?提前谢谢。
的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.panaceasoft.citiesdirectory"
minSdkVersion 10
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')
compile files('libs/android-async-http-1.4.4.jar')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:palette-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.1'
compile 'com.google.code.gson:gson:2.4'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.pnikosis:materialish-progress:1.5'
compile 'com.google.android.gms:play-services:7.5.0'
repositories {
maven { url "https://jitpack.io" }
}
compile ('com.github.afollestad:material-dialogs:53103863a6') {
transitive = true
}
compile 'com.github.rey5137:material:1.1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
}
答案 0 :(得分:1)
在build.gradle文件中,尝试替换
compile ('com.github.afollestad:material-dialogs:53103863a6') { transitive = true }
到
compile 'com.afollestad.material-dialogs:core:0.8.6.1'
compile 'com.afollestad.material-dialogs:commons:0.8.6.1'
然后重建你的项目。