首页 > 解决方案 > Android Studio 3.2.1 中未加载设计布局预览

问题描述

Android资源链接失败输出:

D:\GetDeviceLocation2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
D:\GetDeviceLocation2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
D:\GetDeviceLocation2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:461: error: resource android:attr/fontVariationSettings not found.
D:\GetDeviceLocation2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:462: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Command: C:\Users\KAMAL\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\1004f9e02d2cf44b39e5208f3f298ce2\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
        C:\Users\KAMAL\AppData\Local\Android\Sdk\platforms\android-27\android.jar\
        --manifest\
        D:\GetDeviceLocation2\app\build\intermediates\instant_run_merged_manifests\debug\processDebugManifest\instant-run\AndroidManifest.xml\
        -o\
        D:\GetDeviceLocation2\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
        -R\
        @D:\GetDeviceLocation2\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
        --auto-add-overlay\
        --java\
        D:\GetDeviceLocation2\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
        --custom-package\
        com.mmc.getdevicelocation2\
        -0\
        apk\
        --preferred-density\
        xxhdpi\
        --output-text-symbols\
        D:\GetDeviceLocation2\app\build\intermediates\symbols\debug\R.txt\
        --no-version-vectors
Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

在此处输入图像描述

标签: android

解决方案


转到“构建”标签栏 android studio 。在清理和重建项目之后单击构建。


推荐阅读