Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question build quest2 failed with gradle exception

Discussion in 'VR' started by xorboy, Dec 14, 2020.

  1. xorboy

    xorboy

    Joined:
    Nov 21, 2019
    Posts:
    4
    basic information
    • unity version:2019.416fc1 Personal
    • extrenal tools settings:
      image-20201214223502157.png
    because of the bad network,I cannot download the unity with integration android tools completely.I have to download all the needed tools manually.
    • sdk screenshot
      • build-tools
        unity for 2019.4 needs build-tools of version 28 image-20201214224039080.png
      • sdk-platform

    unity for 2019.4 needs sdk-platforms of version 28
    sdk_platforms.png
    • ndk
    unity for 2019.4 needs ndk of version 19.0.5232133,but I can't find the version from google.I have to modify the source.properties:
    Pkg.Revision = 19.0.5232133
    ndk.png
    • gradle
    unity for 2019.4 needs gradle of version 5.1.1.
    image-20201214232119624.png
    Also,because of the bad network,I have to download the offline-gmaven-stable,and follow the official method to configuration gradle.
    After you have downloaded the offline components, unzip their contents into the following directory, which you might need to create if it doesn’t already exist: %USER_HOME%/.android/manual-offline-m2/.
    1. Create an empty text file with the following path and file name: %USER_HOME%/.gradle/init.d/offline.gradle.

    2. Open the text file and include the following script:
      Code (CSharp):
      1. def reposDir = new File(System.properties['user.home'], ".android/manual-offline-m2")
      2. def repos = new ArrayList()
      3. reposDir.eachDir {repos.add(it) }
      4. repos.sort()
      5.  
      6. allprojects {
      7.   buildscript {
      8.     repositories {
      9.       for (repo in repos) {
      10.         maven {
      11.           name = "injected_offline_${repo.name}"
      12.           url = repo.toURI().toURL()
      13.         }
      14.       }
      15.     }
      16.   }
      17.   repositories {
      18.     for (repo in repos) {
      19.       maven {
      20.         name = "injected_offline_${repo.name}"
      21.         url = repo.toURI().toURL()
      22.       }
      23.     }
      24.   }
      25. }
    3. modify file baseProjectTemplate.gradle to block download action from google and jcenter.
     
  2. xorboy

    xorboy

    Joined:
    Nov 21, 2019
    Posts:
    4
    • player_publishing_settings
    player_publishing_settings.png
    • player_other_settings
    player_publishing_settings.png
    • xr_plug-in_management
    xr_plug-in_management.png
    • assets directory
    image-20201214231050089.png
     

    Attached Files:

  3. xorboy

    xorboy

    Joined:
    Nov 21, 2019
    Posts:
    4
    error message
    after I click Build button(I have downloaded some missing jar files and pom files from mvnrepository),after a few seconds,I got the following error message:
    build_error_1.png build_error_2-1607959097122.png build_error_3-1607959102678.png build_error_4-1607959080394.png build_error_5.png
     
  4. xorboy

    xorboy

    Joined:
    Nov 21, 2019
    Posts:
    4
    build_error_6.png build_error_7.png
    I got too many errors.I have no idea how to reslove this problem.

    Can anybody help me? Thank you very much.
     
  5. mfuad

    mfuad

    Joined:
    Jun 12, 2018
    Posts:
    334
    Hi @xorboy, can you please file a bug with reproducible project so the team can properly track and investigate? Thanks!