当前位置: 首页 > 知识库问答 >
问题:

获取错误“无法设置未知属性包括编译类路径”

微生俊名
2023-03-14

生成文件'M:\project apps\QueenScanner\QueenScanner\QueenScanner\QueenScanner\QueenScanner\app\Build。格拉德尔线:20

评估项目: app时出现问题。

无法为AnnotationProcessorOptions_Decorated{Class Names=[]、参数={}、CompilerArgumentProviders=[]}的类型设置未知属性com.android.build.gradle.internal.dsl.AnNotationProcessorOptions。

这是与错误相关的代码

apply plugin: 'com.android.application'

apply plugin: 'com.jakewharton.butterknife'

apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 31

    defaultConfig {
        applicationId "com.abc.cyberscanner"
        minSdkVersion 16
        targetSdkVersion 31
        versionCode 1
        versionName '1.0'

        multiDexEnabled true

        //Photo editor
        renderscriptTargetApi 31
        renderscriptSupportModeEnabled true
        android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true

    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

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

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

    dexOptions {
        javaMaxHeapSize "4g"
    }

    //Photo editor
    dataBinding {
        enabled = true
    }
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }
}

repositories {
    maven { url "https://jitpack.io" }

    //tedpicker
    maven { url "https://repo.commonsware.com.s3.amazonaws.com" }
    maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    //hungdh
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
    implementation project(':openCVLibrary310')
    //Photo editor
//    annotationProcessor 'ly.img.android:photo-editor-sdk:2.0.27'
//    compile 'ly.img.android:photo-editor-sdk:2.0.27'
    //OCR
    implementation 'com.rmtheis:tess-two:6.1.1'
    implementation 'com.github.mthli:Knife:v1.1'
    //Opennote
    implementation 'com.google.zxing:core:3.3.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    //compile 'com.github.ctodobom:OpenCV-3.1.0-Android:9e00ee4218ca0c9e60a905c9f09bf499f9dc5115'
    implementation 'us.feras.mdv:markdownview:1.1.0'
    implementation 'com.github.ctodobom:drag-select-recyclerview:0.3.4.ctodobom.sections'
    implementation 'com.github.nostra13:Android-Universal-Image-Loader:v1.9.5'
    implementation 'com.github.ctodobom:FabToolbar:3c5f0e0ff1b6d5089e20b7da7157a604075ae943'
    //Simple document scanner
    implementation 'com.afollestad.material-dialogs:core:0.9.6.0'

    implementation 'com.jakewharton.timber:timber:4.1.2'
    //ImagetoPDF
    implementation project(':tedpicker')
    implementation project(':photo-editor-sdk-2.0.27')
    implementation 'com.itextpdf:itextg:5.5.9'
    implementation 'com.balysv:material-ripple:1.0.2'

    implementation 'com.jakewharton:butterknife:10.2.1'
    implementation 'com.google.firebase:firebase-analytics:19.0.2'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'

    implementation 'androidx.multidex:multidex:2.0.1'
    //Auto mail
    implementation 'com.github.yesidlazaro:GmailBackground:1.2.0'
    implementation 'com.github.nextcloud:android-library:-SNAPSHOT'
    //filter_image
    implementation 'it.chengdazhi.styleimageview:styleimageview:1.0.4'
    //photoview
    implementation 'com.github.chrisbanes:PhotoView:2.1.3'
    implementation 'com.google.android.gms:play-services-ads:20.4.0'
//sửa là lỗi (lúc có firebase-core)
    //implementation files('/libs/photo-editor-sdk-2.0.14.aar')
    implementation 'com.github.clans:fab:1.6.4'
    implementation 'com.facebook.android:facebook-android-sdk:5.13.0'
    implementation 'com.facebook.android:audience-network-sdk:5.8.0'
    implementation project(path: ':dynamicgrid')

}```

共有1个答案

慕皓君
2023-03-14

只需删除代码:

android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
 类似资料:
  • 所以,昨天一切都很好,但现在Android Studio和我的项目抛出了这个错误: 我谷歌了很长时间,但还没有找到任何解决方案。我的项目没有任何单词“Assemble”(项目中的Ctrl+Shift+F)。 gradlew clean Build-StackTrace:

  • 当运行android时,我对本机项目做出了反应,显示了这个错误 生成文件'C:\dev\icnet\u final\android\app\Build。格拉德尔线:213 评估项目“: app”时出现问题。 无法获取类型为org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer的配置容器的未知属性“

  • 我想读取build.gradle中local.properties中定义的属性(如本文所述),因此在根build.gradle文件中有以下内容: 在模块的build.gradle文件中,我有以下内容: 但同步后出现以下错误: 无法获取类型为com.android.build.gradle.internal.dsl.defaultconfig得defaultconfig得defaultconfig{

  • 我切换到gradle 7.0最近,现在不能建立我的项目罐,与错误 无法获取类型为org的配置容器的未知属性“runtime”。格雷德尔。应用程序编程接口。内部的人工制品配置。DefaultConfigurationContainer` 这是我的build.gradle:

  • 我收到错误: 错误类型错误: 无法读取在评估 (webpack-internal:///./node_modules/@angular/common/esm5/http.js:163) 处未定义的属性 “长度”在 Array.forEach () 在 httpHeaders.lazyInit (webpack-internal:///./node_modules/@angular/common/e

  • 错误:无法获取DefaultConfig_Enterprise{name=main,dimension=null,minsdkversion=null,targetsdkversion=null,renderscripttargetapi=null,renderscriptsupportmodeenabled=null,renderscriptsupportmodeblasenabled=null