Search code examples
androidandroid-studioaapt2

Android resource linking failed Output: error: failed to create directory


I have updated my android studio and sdk version to 28. After that when i try to create a new application, it is showing the below error. I didn't find any solution in here.

Android resource linking failed
Output:  error: failed to create directory 'E:\Android\MustComplete\Demoooooo\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\com\example\rumi\demoooooo'.

Command: C:\Users\DIU\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\c7a51caf533b71858f0852738f0d2d63\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
        D:\install\Android-Studio\Sdk\platforms\android-28\android.jar\
        --manifest\
        E:\Android\MustComplete\Demoooooo\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
        -o\
        E:\Android\MustComplete\Demoooooo\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
        -R\
        @E:\Android\MustComplete\Demoooooo\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
        --auto-add-overlay\
        --java\
        E:\Android\MustComplete\Demoooooo\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
        --custom-package\
        com.example.rumi.demoooooo\
        -0\
        apk\
        --output-text-symbols\
        E:\Android\MustComplete\Demoooooo\app\build\intermediates\symbols\debug\R.txt\
        --no-version-vectors
Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

Anyone faced this problem? Can anyone help me to solve this error?


Solution

  • Finally managed to get rid of it by closing Android Studio fully and then restart the Android Studio. Also tried File -> Invalidate caches / Restart It works like a charm :-)