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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 5 and Android Studio

Discussion in 'Android' started by lintonachmad, Jul 21, 2015.

  1. lintonachmad

    lintonachmad

    Joined:
    Jul 1, 2015
    Posts:
    1
    Hi Guys.

    Could someone please enlighten me on how to heck do export a project from Unity to Android Studio.

    I have tried the export to Google project but to no luck.

    I'm using Unity 5. Any simple steps would be appreciated. Please help
     
  2. chenyuchih

    chenyuchih

    Joined:
    Jun 3, 2015
    Posts:
    37
    1. build android project from unity
    a. File -> Build Settings->Android
    b. Enable option for Google Android Project
    c. Build (You must correctly download set android sdk path )
    d. the directory should contain
    2. Open Android Studio
    a. import project (Eclipse ADT, Gradle ,etc)
    b. allow all options
    c. you should import the project in <user>/SoruceProject/...
    If you use any third party dll plugin, you must use shared object version of them
    http://docs.unity3d.com/Manual/PluginsForAndroid.html
    d. just build & run
    e. if you want sign the apk, change build.gradle as
    http://developer.android.com/tools/publishing/app-signing.html
     
    codestage, aer0ace and wuhuan like this.
  3. enriqueflores

    enriqueflores

    Joined:
    Jul 25, 2014
    Posts:
    6
    Hi chenyuchih!

    I followed every step you explain .. but when I open the project with Android Studio, the Gradle file is empty and can not run the project. You tell me if there is any extra step that you forgot?
     
  4. chenyuchih

    chenyuchih

    Joined:
    Jun 3, 2015
    Posts:
    37
    @enriqueflores
    Sorry for late response. Maybe you have solved this.
    Do you import which directory with android studio?
    Here I use the direcotry specified in step 1. (You should see AndroidManifest.xml after step 1 complete)
    And the import result should like this
     
  5. enriqueflores

    enriqueflores

    Joined:
    Jul 25, 2014
    Posts:
    6
    Done. @chenyuchih I made a mistake when I open the project using "open project" instead of "import" option. thanks!!..