Keep track of the problems you encounter in packaging Android
First encountered some errors, but also can not understand because not to do Java, search also can't search the corresponding answer
But in fact, because there is no real use of Java or Android to do development, so the most critical problem is the installation and configuration.
This log was posted on October 6, 2017, at the moment the latest Java version is 9, Java SE Development Kit 9
First I downloaded, but because of some other reasons to estimate the failure to succeed, and then downloaded 8, and finally 8 successfully packaged. After downloading the installation, the path defaults to the address configured below, if changed manually replaced.
The environment variable is then recommended to use the system environment variables directly:
CLASSPATH
.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar;%java_home%\bin;
Java_home
C:\Program files\java\jdk1.8.0_144
Android_sdk_home This is the Android SDK, I added, and do not need to add
E:\AndroidSDK
Append to Path: If you do not add the Android SDK, you can remove the Android SDK
;%android_sdk_home%\platform-tools;%android_sdk_home%\tools;%java_home%\bin;%java_home%\jre\bin;
After the addition, run the Java-version javac-version
Can see version information indicating successful configuration of environment variables
In addition to download the latest Android Studio, after the next open Androidstudio,
Point configure, point to SDK Manager, install the corresponding release version of tools, etc., I am publishing here is 7.0, that is, the installation API level 24.
Most importantly, be sure to manually tick show package detials in the lower right corner and then include Android 7.0 under Google Apls .... Check all Installation
In fact, definitely do not need to check the installation of all, but installed has no impact, more space for the hard disk.
Then click on the SDK Tools tab, also tick the lower right corner of show package detials, the most important thing is to tick the Android SDK build-tools the following version number 24, can be checked all, these default are hidden uncheck not see
Also under Android SDK tools and Google Play ... Like, you can put it all in.
Specifically, I don't know, I didn't find it, I did it a couple of years ago, and I did this, and it wasn't Android Studio, it was a separate SDK Manager, and it was very clear that the APIs and tools were Uinty3d.
But this is really anti-human, by this stumbled a half-day, out of the question also can not search, Uinty3d official website also does not have this aspect to explain, various documents also did not tell you what Android studio specifically should be installed, it is estimated that the Android has been engaged in the Daniel Bar feel need not explain these.
Unity3d configuration, edit->preferences->external Tools configuration of the Android SDK and Java JDK corresponding address, NDK Click on the right side of the download loaded to put it into the path of no Chinese is also matched.
Then pack the settings, File->build Settings, select the Android platform, then click Player Settings, in other Settings
Modify the package Name to customize one.
Then choose the Minimum API level and Target API level to do so.
Remember to figure out the difference between 32-bit and 64-bit, and don't download the wrong installation.
Finally can be packaged successfully, but tried the next only a few UI scenes, released the APK incredibly has more than 50 MB ... Go on, look.
Unity2017 Pack release Android finishing