How to Use unity3d to publish an Android apk file is absolutely fine. unity3dapk

Source: Internet
Author: User

How to Use unity3d to publish an Android apk file is absolutely fine. unity3dapk




1. First of all. Is necessary software tools. Needless to say, unity3d is necessary (think it's not nonsense ). Then. We have some running environments. Java (jdk). Android simulator (sdk) [Of course you have a real machine]. You can download these files from the Internet.
Here I will provide you with an Android simulator (sdk) Java (jdk. Du Niang came out in a moment. Unity3d
Let alone it. ). Haha.

2. Installation

1. install Java.
This is very simple. Open the download and select a path for installation.
Environment configuration. Right-click my computer-properties-advanced-environment variables-create three new paths (if there is a variable name, you can directly operate on it ).

1. variable name JAVA_HOME
Variable value Crogram FilesJavajdk1.7.0 _ 03 (this may not have to be created. Note: Crogram FilesJavajdk1.7.0 _ 03 this is mine. You may be D:..., E:...) This is my java path.
 

 


2. variable name CLASSPATH
Variable value.; % JAVA_HOME % lib ools. jar; % JAVA_HOME % libdt. jar; % JAVA_HOME % in; Crogram FilesJavajdk1.7.0_03jrelibextQTJava.zip
 


3. variable name Path variable value Crogram FilesJavajdk1.7.0 _ 03 in (this may already exist. It doesn't matter if you put this path before and after it. If you put it at the end of C:..., separate them with semicolons. If yes, you don't need .)


 


Note. This is my personal one. You need to know your java installation path.



2. Install the Android simulator (sdk.
This is very simple. After you download it. Directly decompress the package. Decompress the package. Don't forget. This also requires environment settings. Add the Path of the platform-tools Folder to the Path variable value mentioned above. My is G: adt-bundle-windows-x86platform-tools
 


You can click sdk Manager.exe
 


There are already Android versions that have been downloaded and installed, 2.3.3 3.0 3.1. (That's Why You downloaded more than 600 mb ).
 


If you need a higher version. You can run to update more versions you want.
Okay. Put this first. Click AVD Manager.exe.
 


After running. This interface is displayed.
 


The red line shows the different Android versions I have created. Don't worry. You will have it later.
What you need to do is. Click new on the right.
The following interface is displayed.
 


You can enter your AVDname as needed. Then select Device. This is to set the screen size. You can select either of them. That is. Click the drop-down arrow of Target. No .; The content is the various Android versions you have installed. You can choose what you need. Don't forget. Select the size of the SD Card. Okay. Click OK. OK again. No. Your AVD interface. Is there an Android version? You can create several more versions. Select an Android version. Click Start in the lower-right corner and then click Launch. Wait for a while.
The real machine (Virtual Machine) is coming out. Success. Hahahaha. Okay. Now the environment has been configured

3. Publish an apk

Open your unity3d. What is done. Let's not talk about it here. Now we only discuss the release process.
 


Suppose you have done something well. Prepare for release. Let's get started.
First. Set your simulator path. Click Edit-Preferences in the menu bar.
 


View the path of your simulator with the Android SDK Location Option.
Image: Image 13.jpg

 


Mine is
 

After this setting is complete. Let's continue.
Click File-Build Settings.
 


Then click Add Current to Add your scenario. Click Switch platform to make sure that your unity icon is in the Android line, and then click Play Settings ....
 

 
 
Note the red line. If you have not set it. The first red line shows that you should be com. Company. Productname. Remember to change Company to something else. As long as it is not a Company. Cannot release.
In addition, it is the second redline. This is the running environment of the apk file you want to publish. It is also the lowest environment. Here we select 2.3. Each unity version has a minimum release limit. I already have the minimum limit.
Higher unity versions have higher minimum Android version limits.
Note. If your Android version does not exist in your simulator. Then a publishing error occurs. In addition, we assume that you have released a version 3.0. You only have a very high version of 4.0 in the simulator. It will also cause an error. So pay special attention to this. I used to only hit the wall here.
Okay. This setting can be released. Click Build. You can publish the apk file.
Finally, we will teach you how to install the published apk file.
This is simple.
Put your apk file in the root directory of drive D (you can also put it in another root directory. Because I only have d disks except drive C. Depressing ).
Why is it stored in the root directory of the disk ?. This is for ease of installation. Now you know.
Then open "command prompt"
You can also click Start-run and Enter cmd to open the command prompt.
The command prompt is attached. Enter D: Press enter (in this case, find your apk file in the d root directory. If you put it in a deeper file. That is very troublesome .)
Then, enter
Adb install xxx.apk press enter (xxx is the file name of your apk file)
You will see it. He is installing.




Note that. Run this on your Android Virtual Machine before installation.
After installation is complete. You can see it on your VM screen. Your stuff. Are you very excited.
Enjoy it slowly .......
This is an original article. If there are any deficiencies. I hope you will not be enlightened.
It's nice to have you this night. May you have a pleasant evening.



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.