Unity3d Publish apk detailed steps to run in an Android virtual machine (Unity3d export Android apk) _android

Source: Internet
Author: User

Unity3d publishes detailed steps for APK to run in the Android virtual machine (Unity3d export Android apk), the total process is divided into the following 6 steps:

1. Installation JAVA_JDK

2. Configure Java Environment variables

3, update the Android SDK

4. Release APK documents from Unity3d

5. Create Android virtual machine and run

6, install the APK file into the Android virtual machine

(For the convenience of beginners, in the following for each step of the specific operation and the problems you may encounter in detail)

1. Installation JAVA_JDK

Official website (www.java.com), free, I installed the file name is Jdk-7u10-windows-i586.exe, version has new and old, you download to the version number may be different from me, does not matter;

2. Configure Java Environment variables

Right key my Computer → properties → advanced system settings → advanced → environment variables, click the New button in the system variable below

Enter variable name Java_home

The input variable value is the installation path of the JAVA_JDK in the previous step, and mine is C:\Program Files (x86) \java\jdk1.7.0_10

Click OK;

Create a new variable with the variable named Classpath and the value of the variable as follows:

.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar;%java_home%\bin

(Don't fall in front of that point) here is the relative path, so you can copy my, click OK;

Find an existing system variable path, edit its value, don't change the original content, and at the end add

; C:\Program Files (x86) \java\jdk1.7.0_10\bin

(Note that this comes with your JAVA_JDK installation path, not necessarily the same as what I write.)

At this point, the Java environment variable configuration ended;

3, update the Android SDK

Run the SDK Manager.exe in the Android SDK folder and update the Android version you want on demand;

4. Release APK documents from Unity3d

Before build, make the necessary settings in the Player settings, the following are required:

The company in the Com.Company.ProductName in ①bundle identifier* must be changed to another name.

②install location is set to automatic, otherwise it will fail to run in the Android virtual machine, prompting "unfortunately,*** has stopped." The following figure

The Android version of the ③minimum API level must be below or equal to the Android version of the Android virtual machine you're creating

Then build on it, the first build, you will be prompted to choose the Android SDK path, pay attention to the SDK level (my "E:\Tools\Android\adt-bundle-windows-x86\sdk");

5. Create Android virtual machine and run

Run AVD Manager.exe in the Android SDK folder, click New ... button to create a virtual machine, a variety of options to fill out, relatively simple, there is a point to be sure to play emulation options in the use Host GPU tick, otherwise to the virtual machine installation APK file will be an error, prompt "Failure Install_ Failed_container_error ";

After creating the virtual machine, be sure to run the virtual machine before installing the APK file;

6, install the APK file into the Android virtual machine

Move the published apk file to the Platform-tools folder in the Android SDK path, then open the CMD console and go to the Platform-tools path in the Android SDK path, which is "CD + Specific Path" and mine is "CD E:\Tools\Android\adt-bundle-windows-x86\sdk\platform-tools", then enter;

After entering, enter the adb install +apk filename, return to wait for a while, if the installation succeeds, will prompt success, the following figure

Then, in the virtual machine to find their own apk, play it. (attached below is my own)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.