just built a complete game framework, debugging process, packaging real machine test, but found unable to package, the error report is as follows:
this problem refer to https://blog.csdn.net/THmen/article/details/79424469.
according to THmen, “Unity will call the Android command in the Android SDK tools when it is compiled, but in the new version of the Android SDK tools (mine is 26.1.1), the Android command has been deactivated, so Unity cannot compile normally”. ok, follow the steps to solve, repackage, found another problem, as follows:
C:/Program Files/Java/JDK – 10.0.1 \ bin \ Java exe – Xmx2048M – Dcom. Android. Sdkmanager. Toolsdir = “C:/Users/user/AppData/Local/android Sdk \ tools” – Dfile. = encoding UTF8 – jar “C: \ Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” –
checks to confirm that all configurations are correct.
so what’s the problem?My Unity version is 5.6.6, which is basically the latest version of 5.x.
since I downloaded the SDK and JDK with Android Studio 3.1.2, is it still a version issue?My JDK is 10.0.1, so I go back to JDK 8 .
try again, the problem has been solved, packaging success, this record!
- Solution: unity package failed. Commandinvocationfailure: gradle build failed
- After unity connects with androidstudio, unity packages APK with an error: commandinvocationfailure: failed to re package resources
- The solution of “failed to load il2cpp” in Android package launched by unity
- Error in Cordova project execution command after Android studio upgrade: could not find gradle wrapper within Android SDK
- [unity] when using unity hub, there is a problem of “failed to delete old unit installation file…” problem
- [unity] Android package error java.lang.ClassNotFoundException Did not find class com.unity3d . player.MainActivity
- Android studio reports an error when building AAR for unity
- Android license status unknown solution
- Record the location and cleaning of chrome junk files under appdata of Disk C
- Aapt2 error: check logs for details
- [problem record] installed build tools revision 31.0.0 is broken during Android studio compilation
- [Unity] Solve the problem of IOException: Failed to Copy… in Unity packaging apk
- Unity package APK exception failed to re package resources
- 【Unity 3D】Because you are not a member of this project this build will not access Unity services.
- When the MAC M1 uiautomatorviewer is opened, it displays blank or reports an error
- Failed to execute goal
- Gradle sync failed: Sync failed: reason unknown
- JOM error 2 problem when qtcreator uses cmake to build a project
- Solve gradle project refresh failed
- How to Fix com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed