简体   繁体   中英

Build Android apk on Unity3d

I'm trying to build a android app on Unity3d and it never works (7 exeption). The errors are:

com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #1: Daemon startup failed
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

My Unity versión is 2019.3.7f1.

Open the 'mainTemplate.gradle' file in a text editor and change build.gradle 3.4.0 version to 3.2.0.

'mainTemplate.gradle' Path is “C:\Program Files\Unity2019.3.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates\mainTemplate.gradle”

dependencies { classpath 'com.android.tools.build:gradle:3.4.0'} Change it like below

dependencies { classpath 'com.android.tools.build:gradle:3.2.0'}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM