Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fail to Build

Discussion in 'Android' started by HungPark, Dec 25, 2019.

  1. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    81
    Hi!

    I want to update my app which is already uploaded on Google store.
    I ticked Export Project and Build App Bundle(Google Play) to build and
    export this app to Android Studio, but failed to build it.

    The Console says;

    Invalid build path: ~
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

    My Editor is Unity 2019.1.10f1 with which I made this app.

    Your help will be very appreciated.

    Thank you.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What is your build path? Try building to your Desktop
     
  3. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    81
    Hi!

    The build path is as follows.

    C -> Users -> My name -> AndroidStudioProjects, where my app file is located.

    Thank you.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What was the result of the test I suggested?
     
  5. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    81
    Hi! Jeff,

    Let me test your guideline. The test results will be informed to you soonest.

    Happy New Year!
     
  6. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    81
    Hi! Jeff,

    I got this issue when I changed Unity Editor from Unity2019.1.10f1 to Unity 2019.2.17f1.
    Jeff's word 'path' gave me idea to check and reset the path of the project and the AAB file
    as follows;

    1. The path of the project

    C -> users -> developer -> ApkProjects

    2. The path of the AAB file.

    1) to make the AAB file

    File -> Build Settings -> Export( with ticking Export Project and Build App Bundle(Google Play))

    2) Then, I select the following path of the file;

    C -> Users -> developer -> AndroidStudioProjects ( not ApkProjects)

    That is, the above-mentioned two paths are different each other.

    3) Then, I can get AAB file to export to Android Studio in the following path.

    C -> Users ->developer -> AndroidStudioProjects - project file folder ->
    release - AAB file.

    I don't know the reason why this issue could be resolved by taking the above process, but Jeff's guideline was greatly helpful to solve this head-aching issue.

    Thank you very much.
     
    Last edited: Jan 3, 2020
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Good to hear. So you know, you can create an aab file directly from Unity, there is no need to use Android Studio.