DeepThought
DeepThought

Reputation: 228

Unity: build and run for Android is unavialable

My Unity IDE doesn't allow me to run the project for Android. I successfully do it for iOS, but the android section is totally disabled.
What am I missing?
I use AndroidSDK with both Android Studio and Eclipse - they normally build native projects and run them on devices and emulators. So, there must not be a problem with Android SDK.

enter image description here

Upvotes: 6

Views: 8992

Answers (4)

Chris Hayes
Chris Hayes

Reputation: 13771

On Linux, this will happen with Unity Hub even though you already installed the Android module. What's happening is Unity Hub is putting the files in the wrong place. It's putting the files where Unity Hub is installed, instead of in the correct Unity engine subfolder.

  1. Find where you put the UnityHub.appimage binary.

  2. In that folder you will see a lot of extra files that weren't there before. Those are the Android module files that were incorrectly placed in that folder. Sorting the files/folders by date modified, may help you find the right ones. Some examples of these folders and files:

    /Apk

    /Data

    /Source

    /Tools

    /Variations

    /Whitelists

    ivy.xml

    modules.asset

    UnityEditor.Android.Extensions.dll

  1. Copy or Cut all of those folders and files.

  2. Find where your Unity engine install folder is located. You can quickly find this in Unity Hub by going to Installs > click the 3 dots > "Show in File Browser". Make sure you're clicking on the engine you're using for this project. The screenshot shows the Unity Hub interface with the 'Installs' section selected. A context menu with options 'Add Modules', 'Show in File Browser', and 'Uninstall' is visible. The Unity logo is in the top left corner, and the sidebar includes links to 'Projects', 'Learn', 'Community', and 'Installs'.

  3. Navigate to "202#.#.### > Editor > Data > PlaybackEngines > AndroidPlayer".

  4. Paste the folders and files here.

  5. After restarting the Unity editor, going to "File > Build Settings..", you should now see config settings in the Android tab. The screenshot displays the Build Settings window in Unity, focusing on the Android platform. Various settings are visible, including Texture Compression, ETC2 fallback, Export Project, and Build App Bundle (Google Play). There are options for selecting the Run Device and enabling Development Build. The 'Add Open Scenes' button is at the top right.

This answer was first discovered on the Unity forum, since it helped me I'm sharing here as well. http://answers.unity.com/answers/1749552/view.html

Upvotes: 2

touhid udoy
touhid udoy

Reputation: 4442

I had a up and running Unity editor in my mac. I had been using it couple of months to develop android apps. Suddenly it says No Android Module Loaded. I simply just restarted my machine, now it works again!

Upvotes: 0

Haim Bendanan
Haim Bendanan

Reputation: 831

You should take a look at this thread. "Unity 5.3 only has a few platforms downloaded and installed by default. In the installer, you need to check the platforms you need." When you install unity, make sure you check these

Unity download assistant screenshot

Upvotes: 1

Programmer
Programmer

Reputation: 125455

You need to download the Android module. You failed to include it while installing Unity so you have to do it separately. Make sure the version matches with the Unity version you have.

enter image description here

Upvotes: 1

Related Questions