Android资源链接失败错误: 写入失败,数据无效。 (13)

huangapple go评论89阅读模式
英文:

Android resource linking failed error: failed writing to The data is invalid. (13)

问题

我的所有可绘制对象都没有问题,它们没有任何错误,与我的 XML 文件一样。
我尝试过清除缓存并重新构建。
请帮忙。
我还检查了我的代码,但没有错误。

Android 资源链接失败
输出:错误:无法写入到 'C:\Users\DEV\Desktop\players - Copy\app\build\intermediates\symbols\debug\R.txt':数据无效(13)。

命令:C:\Users\DEV.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\cb53942e601dc602d2c24f120b0cc26a\aapt2-3.2.0-4818971-windows\aapt2.exe link -I
C:\Users\DEV\AppData\Local\Android\Sdk\platforms\android-29\android.jar
--manifest
C:\Users\DEV\Desktop\players - Copy\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
C:\Users\DEV\Desktop\players - Copy\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
@C:\Users\DEV\Desktop\players - Copy\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
C:\Users\DEV\Desktop\players - Copy\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--proguard-main-dex
C:\Users\DEV\Desktop\players - Copy\app\build\intermediates\legacy_multidex_aapt_derived_proguard_rules\debug\processDebugResources\manifest_keep.txt
--custom-package
umo.com.players
-0
apk
--output-text-symbols
C:\Users\DEV\Desktop\players - Copy\app\build\intermediates\symbols\debug\R.txt
--no-version-vectors
守护程序:AAPT2 aapt2-3.2.0-4818971-windows Daemon#0

英文:

All my Drawables are good, They don't have any kind of errors, same as my XML files.
I have tried to invalidate the cache and rebuild
Please help
I have also inspected my code but there are no errors

     Android resource linking failed
     Output:  error: failed writing to 'C:\Users\DEV\Desktop\players - 
     Copy\app\build\intermediates\symbols\debug\R.txt': The data is invalid. (13).

     Command: C:\Users\DEV\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971- 
    windows.jar\cb53942e601dc602d2c24f120b0cc26a\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\
    C:\Users\DEV\AppData\Local\Android\Sdk\platforms\android-29\android.jar\
    --manifest\
    C:\Users\DEV\Desktop\players - 
  
  
    Copy\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
    -o\
    C:\Users\DEV\Desktop\players - 
    Copy\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
    -R\
    @C:\Users\DEV\Desktop\players - Copy\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
    --auto-add-overlay\
    --java\
    C:\Users\DEV\Desktop\players - Copy\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
    --proguard-main-dex\
    C:\Users\DEV\Desktop\players - Copy\app\build\intermediates\legacy_multidex_aapt_derived_proguard_rules\debug\processDebugResources\manifest_keep.txt\
    --custom-package\
    umo.com.players\
    -0\
    apk\
    --output-text-symbols\
    C:\Users\DEV\Desktop\players - Copy\app\build\intermediates\symbols\debug\R.txt\
    --no-version-vectors
 Daemon:  AAPT2 aapt2-3.2.0-4818971-windows Daemon #0

答案1

得分: 1

更改 build.gradle 文件中的以下设置:

classpath 'com.android.tools.build:gradle:3.4.2'

来源:https://stackoverflow.com/questions/54588916/r-txt-the-data-is-invalid-13

英文:

Change to the following settings in build.gradle file :

classpath 'com.android.tools.build:gradle:3.4.2'

source https://stackoverflow.com/questions/54588916/r-txt-the-data-is-invalid-13

huangapple
  • 本文由 发表于 2020年10月21日 22:27:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/64465762.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定