如果我使用的是28 API,则会出现错误:程序类型已存在:androidx.versionedparcelable.CustomVersionedParcelable ,这迫使我迁移到androidx。并迁移 androidx ,这会导致我所有支持片段中的错误
Android资源链接失败
Output: E:\community_app\application\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
E:\community_app\application\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
E:\community_app\application\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:656: error: resource android:attr/fontVariationSettings not found.
E:\community_app\application\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:656: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Kunjan\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\612f5de46ad621100ae4392104a3337f\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
E:\sdk\platforms\android-27\android.jar\
--manifest\
E:\community_app\application\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
E:\community_app\application\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
@E:\community_app\application\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
E:\community_app\application\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.krs.vastipatrak\
-0\
apk\
--output-text-symbols\
E:\community_app\application\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
答案 0 :(得分:0)
我先解决了此问题,方法是先使缓存失效/从 Android studio->文件->使缓存失效/重启->失效并重启,然后转到应用程序的build / intermediates目录,然后删除那里的所有文件和文件夹并重建项目。您可以直接删除此目录中的所有内容: E:\ community_app \ application \ app \ build \ intermediates
我希望这会有所帮助!