Unity_Android packaged with the environment configuration (a)

Download and install the SDK

Double-click the " SDK Manager ", start the SDK Manager

Tools of the check icon option to download it.  

 

API arbitrarily select one, consider the principle downward compatible, you can download the latest API .

Extras select all 

 

SDK environment variable configuration

Right-click on "this computer", select "Properties", the "System" window;

Click "Advanced System Settings" in the pop-up "System Properties" window, click the "Environment Variables";

Under System variables, create a new environment variable,

Variable name: ANDROID_HOME ,

Variable value: D: \ Android SDK or the JDK \ SDK

This variable value is the installation root directory of the SDK!

Click OK.

 

A user variable PATH plus variable value later ;% ANDROID_HOME% \ platform-tools ;

Click OK.

In the system variable path added in ;  D: \ the Android the SDK or the JDK \ the SDK \ Tools

This variable value is the installation root directory of the SDK tools folder name plus

Android SDK configuration is complete, then verify the configuration is successful.

cmd input Android -h

SDK verify whether the installation was successful

 

If a bunch appears in English, as shown above, i.e., the configuration is successful.

Without this command appears not found Android and other errors, check the path is correct environment configuration

If an error occurs is not configured JDK, then we do not rush to configure JDK

JDK environment variable configuration

Right-click on "this computer", select "Properties", the "System" window;

Click "Advanced System Settings" in the pop-up "System Properties" window, click the "Environment Variables";

Double-click "in the" System Variables " Path " variable, in the pop-up "Edit System Variable" window, increase  D: \ Android SDK or JDK \  JDK \ bin

This variable value is the root directory of the installed JDK bin folder names plus

In the "System Variables", click the "New" button in the pop-up "New System Variable" window, increase " ClassPath " system variables,

Variable value:

D:\Android SDK or JDK\JDK\lib\tools.jar;D:\Android SDK or JDK\JDK\lib\dt.jar

This variable value is to install the lib file in the root directory of the JDK folder two files tools.jar and dt.jar

And click OK

In the "System Variables", click the "New" button,

In the pop-up "New System Variable" window

Variable named " Java_Home "

The variable value: D: \ Android SDK or the JDK \ the JDK

This variable value is the root directory of the JDK installation

And click OK

  

JDK verify whether the installation was successful

Enter java -version, Enter

 

Character Description appears above success!

Unity configuration JDK and SDK

 

Select the file (File) - Export Settings (Build Settings ...)

 

Select Android Android download page to download the file and select Open

 

The download is complete open the file installation

 

 

After the installation is completed reboot Unity, select Edit (Edit) - Preferences (Preferences ...)

 

Select external tools (External Tools)

 

Were selected SDK and JDK root directory, and choose a good default, select the folder directly point on it

Unity configuration is complete, then we try to export file

Select the file (File) - Export Settings (Build Settings ...)

 

The compression format to default (ETC (default))

Select playback settings (Player Settings ...)

 

The following interface will appear in the Unity Inspector panel, select other settings (Other Settings)

 

Change the name and version number of Android

Chinese name can not change the format com.XXX

Andrews version not too high, and some versions of the phone is not so high.

 

Click Export (Build)

 

The last will pop up a choice where to place APK files on the desktop can be!

Reprinted  https://www.cnblogs.com/520YAOER/p/9705187.html   YAOER & XiaoYao

Guess you like

Origin www.cnblogs.com/Roz-001/p/11403329.html