Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

weird error prevent unity building apk PLZ help

Discussion in 'Editor & General Support' started by bouemama, Jun 1, 2021.

  1. bouemama

    bouemama

    Joined:
    Dec 6, 2016
    Posts:
    18


    hi, when i build for "App bundle(aab)" done successful but when build for APK i get this red error that told me to USE and DO NOT USE the android.enableR8.

    <br>"WARNING: The option 'android.enableR8' is deprecated and should not be used anymore.
    It will be removed in a future version of the Android Gradle plugin, and will no longer allow you to disable R8.
    WARNING: DSL element 'useProguard' is obsolete and will be removed soon. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard."<br>



    i try multiple solution No luck:
    --------------------------------
    - add/remove android.enableR8=true from gradleTemplate file .
    - switch android.enableR8 to android.enableD8 .
    - reinstall SDK,gradle,android-ndk-r19,jre .



    - unity version :2019.4.27f1
    - gradle:3.6.0
    - target api level :30
    - custom gradleTemplate enabled
    - custom launcherTemplate enabled
    - custom mainTemplate enabled
    - keystore and keystore password verified.

    <br>
    -some changes apply to those files required by google admob plugin:
    Assets/Plugins/Android/mainTemplate.gradle
    Assets/Plugins/Android/launcherTemplate.gradle
    https://developers.google.com/ar/develop/unity/android-11-build?id#unity_20193_and_20194

    any solution plz ?
     
    tequila_tuan likes this.
  2. bouemama

    bouemama

    Joined:
    Dec 6, 2016
    Posts:
    18
    3 days ago No 1 comment :(
     
  3. Foued_Amiri

    Foued_Amiri

    Joined:
    Apr 22, 2021
    Posts:
    1
    I'm having the same error bro, and i don't know how to fix it
    Did you figure out a solution ?
     
  4. bouemama

    bouemama

    Joined:
    Dec 6, 2016
    Posts:
    18
    tequila_tuan likes this.