1

Android resource linking failed Output:

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

enter image description here

Oğuzhan Döngül
  • 7,856
  • 4
  • 38
  • 52
RogerK
  • 29
  • 1
  • 4
  • 11
  • check your mainfest, maybe there are some errors there. – John Joe Oct 31 '18 at 07:05
  • What exactly is your question? – bogl Oct 31 '18 at 08:12
  • Top Heading is my question - Design layout preview isn't loading in Android Studio 3.2.1 – RogerK Oct 31 '18 at 08:13
  • A lot of efforts exhausted me then finally below steps solved my problem: Clear caches folder from C:/Users//.grade/caches Clear caches folder from C:/Users//.AndroidStuido3.x/system/caches Restart Android Studio Clean build project After hours of experimenting and going through lots of solutions, this was the one that actually worked. Hope anyone in the future faces this problem will find this helpful. – RogerK Nov 22 '18 at 09:43

2 Answers2

0

Goto "Build" tab bar android studio . click build after Clean and Rebuild project.

0

1- In your module gradle file

buildToolsVersion **'28.0.3'**
compileSdkVersion **28**
defaultConfig {
    applicationId "com.example.app"
    minSdkVersion 19
    targetSdkVersion **28**
    versionCode 1
    versionName "1.1.0"
    multiDexEnabled false
}

if you use other modules inside project make sure that compileSdkVersion and targetSdkVersion versions are all the same. (28.x.x)

2-This happens when there is an unsuccessful gradle build. See this link: link

3-Another solution is: In the menu

File -> Invalidate Caches / Restart

you need to press Invalidate and Restart button. This helps in many situations especially if you pull changes from a git repository and if someone changed libraries at the gradle files.

Alp Altunel
  • 3,324
  • 1
  • 26
  • 27