How to Solve Unity Package Android Project Error

1. Background

Unity project has the following capabilities

1. It can run directly on Android phones

2. You can build an APK file and then install it on the mobile phone to run

3. It can be packaged into an Android project and run the project using Android studio

There may be no problem that 1 and 2 can be implemented normally, but an error will be reported when implementing the third method
the first error:

unity UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

 

the second error:

UnityEditor.BuildPlayerWindow Error

 

2. Precautions

1. There is no problem with the configuration of gradle environment, because it can be compiled normally

2. The package directory also has no Chinese name

3. There is no problem with the packaging configuration

 

3. Solutions

Exporting Android Studio project needs to be consistent with our project name of unity

For example: File-BuildSettins-PlayerSetting-Player-ProductName name and File-BuildSettins-Build file directory name consistent can be solved

Read More: