android - 错误 :Cannot configure the 'publishing' extension after it has been accessed

标签 android android-studio android-gradle-plugin

错误:访问后无法配置“发布”扩展。

更新我的 android studio 后出现此错误。

这是我的 app.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'  

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    vectorDrawables.useSupportLibrary = true
    generatedDensities = []
}
aaptOptions {
    additionalParameters "--no-version-vectors"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), proguard-rules.pro'
    }
}
dexOptions {
    preDexLibraries = false
    javaMaxHeapSize "4g"
        }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/universal-image-loader-1.9.5.jar')
compile project(':databaseAutoCompleteLibrary')
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.android.support:gridlayout-v7:23.2.0'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'milyn:opencsv:1.6'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile project(':MPChartLib')
compile project(':filechooserlibrary')
//compile 'com.android.support:support-v4:18.0.0'
//compile 'com.android.support:appcompat-v7:18.0.+'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:support-v13:23.2.0'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile project(':Volley')
compile 'com.google.android.gms:play-services:8.4.0'
}

请提供任何解决方案。 我正在使用 Volley 图书馆。 谢谢。

最佳答案

升级到最新的工作室后,我遇到了同样的问题。

我不确定根本原因,但我所做的是

评论来自 volley build.gradle 的行

apply from: 'bintray.gradle'

正如我所见,您的依赖项中有很多项目。 如果可能的话,所有人都发表相同的评论,然后再次尝试同步。

关于android - 错误 :Cannot configure the 'publishing' extension after it has been accessed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36079404/

相关文章:

android - 为什么我在 Eclipse 中调试时看不到局部变量?

java - Android应用程序中引用Facebook SDK

android - Android Studio 中大写的快捷方式

android - 调用需要 API 级别 21(当前为 14)

android - Android Google Services无法下载4.2.0

android - 应用程序崩溃后清除状态栏中的通知

android - 无法为 opencv android 加载信息库

java - Android Studio 无法启动,libjli.dylib 太短

android - 离线创建cordova 5.x android gradle build

android - Android Gradle依赖项冲突和资源重复值