AAPT error: resource android:attr/lightRadius is private

Alex Tsypurdei picture Alex Tsypurdei · Oct 18, 2018 · Viewed 13.5k times · Source

Android resource linking failed

Output:  D:\MyApp\app\src\main\res\layout\activity_main.xml:65: error: resource android:attr/lightRadius is private.
error: failed linking file resources.

Command: C:\Users\web_p\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\1adcdb82f1421529063df256e8348a5a\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
        D:\AndroidApp\platforms\android-28\android.jar\
        --manifest\
        D:\MyApp\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
        -o\
        D:\MyApp\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
        -R\
        @D:\MyApp\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
        --auto-add-overlay\
        --java\
        D:\MyApp\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
        --custom-package\
        com.lasqa.myapp\
        -0\
        apk\
        --output-text-symbols\
        D:\MyApp\app\build\intermediates\symbols\debug\R.txt\
        --no-version-vectors
Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

Help me please, tried: Clean project Rebuild Project Invalid Caches / Restart Sync Project with Gradle Files

Nothing helped , but I hope someone can help me to solve this problem.

Answer

Izabela Orlowska picture Izabela Orlowska · Oct 18, 2018

Look at the error you're getting:

activity_main.xml:65: error: resource android:attr/lightRadius is private.

In your activity_main.xml you're trying to use a private android attribute. That means you don't have access to it (think like trying to access a private method in Java from a different package!). Remove that attribute and it should compile.