Execution failed for task ':app:processDebugResources'. > Android resource linking failed

错误日志:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  Output:  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\fragment_loading_dialog.xml:10: error: resource style/AVLoadingIndicatorView (aka com.xiaoguo.saiis:style/AVLoadingIndicatorView) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\fragment_loading_dialog.xml:10: error: attribute indicatorColor (aka com.xiaoguo.saiis:indicatorColor) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\fragment_loading_dialog.xml:10: error: attribute indicatorName (aka com.xiaoguo.saiis:indicatorName) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:9: error: attribute srlEnableLoadMore (aka com.xiaoguo.saiis:srlEnableLoadMore) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:9: error: attribute srlEnableRefresh (aka com.xiaoguo.saiis:srlEnableRefresh) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:16: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:16: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:37: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:37: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:9: error: attribute srlEnableLoadMore (aka com.xiaoguo.saiis:srlEnableLoadMore) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:9: error: attribute srlEnableRefresh (aka com.xiaoguo.saiis:srlEnableRefresh) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:16: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:16: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:37: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:37: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:9: error: attribute srlEnableLoadMore (aka com.xiaoguo.saiis:srlEnableLoadMore) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:9: error: attribute srlEnableRefresh (aka com.xiaoguo.saiis:srlEnableRefresh) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:16: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:16: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:37: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
 
  Command: C:\Users\18561\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\47d65b3c7dd592bd24d4ae353368d907\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
          C:\Users\18561\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
          --manifest\
          E:\saiis1\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
          -o\
          E:\saiis1\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
          -R\
          @E:\saiis1\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
          --auto-add-overlay\
          --java\
          E:\saiis1\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
          --custom-package\
          com.xiaoguo.saiis\
          -0\
          apk\
          --no-version-vectors\
          --output-text-symbols\
          E:\saiis1\app\build\intermediates\symbols\debug\R.txt\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
  Output:  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\fragment_loading_dialog.xml:10: AAPT: error: resource style/AVLoadingIndicatorView (aka com.xiaoguo.saiis:style/AVLoadingIndicatorView) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\fragment_loading_dialog.xml:10: AAPT: error: attribute indicatorColor (aka com.xiaoguo.saiis:indicatorColor) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\fragment_loading_dialog.xml:10: AAPT: error: attribute indicatorName (aka com.xiaoguo.saiis:indicatorName) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:9: AAPT: error: attribute srlEnableLoadMore (aka com.xiaoguo.saiis:srlEnableLoadMore) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:9: AAPT: error: attribute srlEnableRefresh (aka com.xiaoguo.saiis:srlEnableRefresh) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:16: AAPT: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:16: AAPT: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:37: AAPT: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_foot_refresh.xml:37: AAPT: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:9: AAPT: error: attribute srlEnableLoadMore (aka com.xiaoguo.saiis:srlEnableLoadMore) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:9: AAPT: error: attribute srlEnableRefresh (aka com.xiaoguo.saiis:srlEnableRefresh) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:16: AAPT: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:16: AAPT: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:37: AAPT: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_foot_refresh.xml:37: AAPT: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:9: AAPT: error: attribute srlEnableLoadMore (aka com.xiaoguo.saiis:srlEnableLoadMore) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:9: AAPT: error: attribute srlEnableRefresh (aka com.xiaoguo.saiis:srlEnableRefresh) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:16: AAPT: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:16: AAPT: error: attribute srlTextSizeTitle (aka com.xiaoguo.saiis:srlTextSizeTitle) not found.
      
  E:\saiis1\axframe\build\intermediates\packaged_res\debug\layout\rv_head_refresh.xml:37: AAPT: error: attribute srlAccentColor (aka com.xiaoguo.saiis:srlAccentColor) not found.
      
  Command: C:\Users\18561\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\47d65b3c7dd592bd24d4ae353368d907\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
          C:\Users\18561\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
          --manifest\
          E:\saiis1\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
          -o\
          E:\saiis1\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
          -R\
          @E:\saiis1\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
          --auto-add-overlay\
          --java\
          E:\saiis1\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
          --custom-package\
          com.xiaoguo.saiis\
          -0\
          apk\
          --no-version-vectors\
          --output-text-symbols\
          E:\saiis1\app\build\intermediates\symbols\debug\R.txt\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
19 actionable tasks: 1 executed, 18 up-to-date

 

解决办法

compileOnly 'org.greenrobot:eventbus:3.1.1'
api("com.scwang.smartrefresh:SmartRefreshLayout:1.0.5-alpha-0") {
    exclude group: 'com.android.support'
}
api("com.scwang.smartrefresh:SmartRefreshHeader:1.0.5-alpha-0") {
    exclude group: 'com.android.support'
}
api("com.wang.avi:library:2.1.3") {
    exclude group: 'com.android.support'
}

以下方法完全不管用:

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '28.0.0'
            }
        }
    }
}

 

加入这个后可能还报些其他错误:

但是有时候也不抱,尴尬,可以加下面的显示

//    compileOptions {
//        targetCompatibility 1.8
//        sourceCompatibility 1.8
//    }

 

Executing tasks: [:app:assembleDebug] in project D:\Users\lenovo\AndroidStudioProjects\Pinduoduo WARNING: The specified Android SDK Build Tools version (27.0.0) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.5.2. Android SDK Build Tools 28.0.3 will be used. To suppress this warning, remove "buildToolsVersion '27.0.0'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:checkDebugManifest UP-TO-DATE > Task :app:generateDebugBuildConfig UP-TO-DATE > Task :app:javaPreCompileDebug UP-TO-DATE > Task :app:mainApkListPersistenceDebug UP-TO-DATE > Task :app:generateDebugResValues UP-TO-DATE > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE > Task :app:mergeDebugShaders UP-TO-DATE > Task :app:compileDebugShaders UP-TO-DATE > Task :app:generateDebugAssets UP-TO-DATE > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:compileDebugAidl NO-SOURCE > Task :app:generateDebugResources UP-TO-DATE > Task :app:mergeDebugResources UP-TO-DATE > Task :app:processDebugManifest > Task :app:processDebugResources FAILED AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"D:\\Users\\lenovo\\AndroidStudioProjects\\Pinduoduo\\app\\src\\main\\res\\layout\\activity_main.xml","position":{"startLine":34}}],"original":"D:\\Users\\lenovo\\AndroidStudioProjects\\Pinduoduo\\app\\src\\main\\res\\layout\\activity_main.xml:35: AAPT: error: '#875ale' is incompatible with attribute textColor (attr) reference|color.\n ","tool":"AAPT"} FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugResources'. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource linking failed D:\Users\lenovo\AndroidStudioProjects\Pinduoduo\app\src\main\res\layout\activity_main.xml:35: AAPT: error: '#875ale' is incompatible with attribute textColor (attr) reference|color. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 3s 11 actionable tasks: 2 executed, 9 up-to-date
06-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值