Download SDK,JDK installation, configuring the Java environment
1. Download the SDK, download adt-bundle-windows-x86_64-20131030.zip,:http://pan.baidu.com/share/link?uk=2487026278 &SHAREID=5736734&THIRD=4&ADAPT=PC&FR=FTW unzip it like this.
2. Configure the Java environment: opening the Eclipse.exe file in the Eclipse file will prompt
This is missing JRE runtime environment, let's download and install it :http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htmlChoose the jdk you want to download and install, and after the installation is complete, you need to configure your Java environment
Win7 interface compared to XP do a little bit of modification, but do not affect the operation here you need to set Java_home, CLASSPATH, path three environment variables.
A), right click on "Computer", click "Properties" click " Advanced system Settings" in the left part of the popup interface
Select "Advanced" tab, click "Environment variable" in "System Variable", set 3 property Java_home, CLASSPATH, Path (case-insensitive), if existing then click "Edit", not exist then click "New";
b), java_home indicate the JDK installation path, that is, the path that was selected at the time of installation e:/java/jdk1.6.0_20, this path includes Lib,bin,jre folder (this variable is the best setting, because later run tomcat,eclipse and so on need to depend on * this variable);
c), path allows the system to identify the Java command under any path, here, to note that the path should be existing, do not create a new, find path, click "Edit", the top of the value of the following statement can be. If you overwrite the path variable, some basic commands will not be found under CMD. %java_home%/bin;%java_home%/jre/bin;
D), Classpath is the Java load class (class or Lib) path, only the class in Classpath, Java command can be recognized, set to: .; %java_home%/lib/dt.jar;%java_home%/lib/tools.jar (to Add. Indicates the current path)%java_home% is referring to the java_home specified earlier;
4, check the installation configuration is correct
Click "Start" and type "cmd";
, enter
Run the "java-version", "Java", and "Javac" three commands to see if the output is similar. The screen appears, the installation configuration OK.
3. Update the Android SDK:
Open the Android SDK Manager window, select each version update, and start the download. Make sure the API is updated to.
4.Set up the Unity Android SDK Directory: Open Unity Edit-Preferences ... Browse the directory of the Andoid SDK, which is our previously customized C:\ADT\SDK directory. and the JDK.C:/Program files/java/jdk1.8.0_65Catalog Next we perform the Unity release test, open the file-and build Setting Compile Settings dialog box, select the Android icon, click the Switch Platform button, so you can switch to the Android publishing platform. Connect your phone, then click Build and run to publish and try it out.5. After you have finished, you should already be able to package the apk file, say this apk file installed on the test phone, note that the export Android project must be checkedDevelopment Build
Open the CMD Command Line window and enter the following command:
[HTML]View Plaincopy
- CD C:\adt\sdk\platform-tools--the address of your SDK
- ADB forward tcp:54999 Localabstract:unity-com.thisisgame.gamedemo
Then open the game on your phone.
Open the Unity Profiler window selection ([email protected]:54999)
You can then perform a performance analysis on the profiler.
problems encountered:Issue one: Pack apk times wrong: Androidmanifest.xml:4: Error:no Resource identifier found for attribute ' Isgame ' in the package ' Android ' Androidmanifest.xml : 4:error:no resource Identifier found for attribute ' banner ' on package ' Android ' Workaround: Http://answers.unity3d.com/questi ons/914949/unity-5-androidmanifestxml4-error-no-resource-iden.html update Sdk-api level to 21 (latest) Thanks: http://blog.csdn.net /luyuncsd123/article/details/17735823http://blog.csdn.net/yusiguyuan/article/details/14123669http:// blog.csdn.net/huutu/article/details/39379453
Unity5.2.1 on Android Real-machine Debug environment configuration