相关疑难解决方法(0)

无法创建任务 ':app:minifyReleaseWithR8'。无法查询此提供程序的值,因为它没有可用值

我一直在尝试同步我的项目,但在 Android Studio 上出现此错误。我正在使用 android studio 4.1 和 gradle 6.5。当我将 android studio 从 4.0 升级到 4.1 时出现问题在此处输入图片说明

android gradle

51
推荐指数
6
解决办法
3万
查看次数

Android Studio:超出了GC开销限制

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> java.lang.OutOfMemoryError: GC overhead limit exceeded
Run Code Online (Sandbox Code Playgroud)

尝试:

dexOptions {
    javaMaxHeapSize "4g"
}
Run Code Online (Sandbox Code Playgroud)

这似乎是在线提供的唯一解决方案.

但它仍然超过了第二次构建的限制,除非我杀死工作室任务并重新启动,这使它第一次工作.

build.gradle中的依赖项肯定不多

build.grade

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.xxxxx.android"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 8
        versionName "1.3"
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:recyclerview-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.jakewharton:butterknife:6.1.0'
    compile 'com.squareup.okhttp:okhttp:2.3.0'
    compile 'com.squareup.okhttp:okhttp-urlconnection:2.3.0'
    compile …
Run Code Online (Sandbox Code Playgroud)

android android-studio

8
推荐指数
2
解决办法
8201
查看次数

标签 统计

android ×2

android-studio ×1

gradle ×1