Search Unity

Question Android Gradle fail library. unity

Discussion in 'Android' started by conguerror, Dec 2, 2022.

  1. conguerror

    conguerror

    Joined:
    Nov 23, 2019
    Posts:
    42
    Anyone knows how to fix it? I tried so many things including upgrading to new version of engine, using default ndk and skd, gradle, using android studio's stuff instead of unity's. no result

     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,905
    Do you have gradle template set, if so, it might be invalid. Try recreating it.
     
  3. conguerror

    conguerror

    Joined:
    Nov 23, 2019
    Posts:
    42
    What do you mean by valid Gradle set? I am using unity's built in Gradle although I did try to download Gradle myself, set up environment and etc. But it didn't work
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,905
  5. conguerror

    conguerror

    Joined:
    Nov 23, 2019
    Posts:
    42
    Yeah I do have. I tried both unity's Gradle and custom downloaded one. None work for me
     
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,905
    Export gradle project from Unity and attach unityLibrary/build.gradle here, it says compiledSdkVersion is wrong
     
  7. conguerror

    conguerror

    Joined:
    Nov 23, 2019
    Posts:
    42
    Solution for me was: use Gradle and android manifests from the version that was working properly. I also reinstalled unity with all it's modules and Gradle that is compatible.
    Also delete all third party SDKs.
     
  8. conguerror

    conguerror

    Joined:
    Nov 23, 2019
    Posts:
    42
    I wish unity made a proper option to reinstall the android module in unity hub