解决error: resource android:attr/dialogCornerRadius/fontVariationSettings/ttcIndex not found.

刚接手的项目,Android端是部署在斑马TC70的pda上的。主管给我发了源码,让我看看。然鹅我用AS打开报了错!
话不多说了呀!贴出我的error信息!
如下:(注意看粗体!!)
Android resource linking failed
Output: E:\AndroidStudioProjects\BarcodeSample1old\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
E:\AndroidStudioProjects\BarcodeSample1old\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
E:\AndroidStudioProjects\BarcodeSample1old\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1263: error: resource android:attr/fontVariationSettings not found.
E:\AndroidStudioProjects\BarcodeSample1old\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1264: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Command: C:\Users\15438.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\78f09aaef7de935f21bece364dbef1b1\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
D:\androidSDK\Sdk\platforms\android-26\android.jar
–manifest
E:\AndroidStudioProjects\BarcodeSample1old\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
E:\AndroidStudioProjects\BarcodeSample1old\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
@E:\AndroidStudioProjects\BarcodeSample1old\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
–auto-add-overlay
–java
E:\AndroidStudioProjects\BarcodeSample1old\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
–custom-package
com.symbol.barcodesample1
-0
apk
–output-text-symbols
E:\AndroidStudioProjects\BarcodeSample1old\app\build\intermediates\symbols\debug\R.txt
–no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

**其实它是SDK版本引起的问题,只要把AS中的SDK的版本设置到28即可,因为高版本是向下兼容的呀!之前我在网上找了很多方法都没有成功,我把那些方法也贴出来吧!**可能对你们的问题是有帮助的!

1.大家觉得是Aapt2的问题!所以禁用了它!在gradle.properties里面写一句这样的
android.enableAapt2=false
即可!
2.有的人按照上面这个方案1改完了就没问题了,但还有的人出现了这个问题:
Process ‘command ‘C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\27.0.0\aapt.exe’’ finished with non-zero exit value 1
方案如下:https://blog.csdn.net/qq_24118527/article/details/83586161 !

我在解决这个error的时候遇到了这些情况,就总结记录了下来,希望后来者能有所得!

你可能感兴趣的:(error积累)