Search Unity

Gradle Error: Configure project :launcher. The option 'android.enableR8' is deprecated

Discussion in 'Android' started by Dan_G, Jun 16, 2021.

  1. Dan_G

    Dan_G

    Joined:
    Dec 4, 2017
    Posts:
    24
    Hi,

    I am having problems when compiling for Android for Quest (i´m using 2020.3.4f1). I have done a lot of research and I think there might a conflict between SDKs but i am not sure. I tried in another machine and i got the same error, so i tried to make a "Development Build" and for some reason it build fine... really strange! Then i tried again to make a normal Build but i got the same errors.

    This is the first time i´ve seen this type of error so i am not sure where the problem is, although it looks like it´s coming from Android.

    These are the errors i am getting:

    Code (CSharp):
    1. Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
    2. > Configure project :launcher
    3. WARNING: The option 'android.enableR8' is deprecated and should not be used anymore.
    4. It will be removed in a future version of the Android Gradle plugin, and will no longer allow you to disable R8.
    5. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
    6. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    7. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    8. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    9. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
    10. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    11. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    12. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    13.  
    14.  

    Code (CSharp):
    1. FAILURE: Build failed with an exception.
    2. * What went wrong:
    3. Execution failed for task ':launcher:checkDebugDuplicateClasses'.
    4. > 1 exception was raised by workers:
    5.   java.util.zip.ZipException
    6. * Try:
    7. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    8. * Get more help at https://help.gradle.org
    9. BUILD FAILED in 8s
    10. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    11. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

    Code (CSharp):
    1. CommandInvokationFailure: Gradle build failed.
    2. C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2020.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.6.4.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleDebug"
    3. stderr[
    4. FAILURE: Build failed with an exception.
    5. * What went wrong:
    6. Execution failed for task ':launcher:checkDebugDuplicateClasses'.
    7. > 1 exception was raised by workers:
    8.   java.util.zip.ZipException
     
unityunity