Recording Android Strudio packaging errors and solutions (1)

Question 1: Packaging error

Unity.IL2CPP.Building.BuilderFailedException: 
C:\Users\user\AppData\Local\Android\Sdk\ndk\21.0.6113669\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ 
@"C:\Users\user\AppData\Local\Temp\tmp7277.tmp" -o "D:\Build\F1_Moto_3\unityLibrary\build\il2cpp_armeabi-
v7a_Release\il2cpp_cache\linkresult_E785829920EB9DA92D80A0D1BD1336CA\libil2cpp.so" -shared -Wl,-
soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-
libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction 
"D:\Build\F1_Moto_3\unityLibrary\src\main\jniStaticLibs\armeabi-v7a\baselib.a" -llog -rdynamic -fuse-ld=gold.exe

Insert image description here
Delete these items from the unity exported project and repackage them.
The package I exported is independent, and what I actually used Adroidstudio to operate was another F1_Moto_3,
Insert image description here
so I finally copied these four from F1_Moto_1 to F1_Moto_3.

Question 2: Then a new error occurred

Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken
 because the classes and Android resources from any local .aar file dependencies would not be packaged in the
  resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not
   throwing this error). The following direct local .aar file dependencies of the :unityLibrary project caused this error: 
   D:\Build\F1_Moto_3\unityLibrary\libs\EmoSDK-release.aar

This error is due to

1、

After updating the build version gradle-7.2, aar is no longer directly dependent (you can read other people’s articles for this solution)
Portal: https://www.cnblogs.com/guanxinjing/p/17012120.html

2、


If you have not updated the bulid version or used advanced gradle, then directly select Bulid => Clear Projecet => Rebulid Project" in android studio , and then build the APK directly, as shown below
Insert image description here

3.
Delete the unity libary file and repackage it.

Question 3: Later I packaged the official Release package and it was no problem, but the Debug package

Insert image description here

But when I opened the Debug package , the error "Unable to find EOCD signature" appeared.

> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Unable to find EOCD signature

The error message is that there is an exception in the signature.
The reason is that the signature can only be used in the official package, and an error will occur in the informal environment of the Debug package. This is our original words, but it won't
work if I use my own signature.
Finally, the solution was solved by changing the packaging method.
Insert image description here
The package is in launcher => build => outputs => apk => debug.
Insert image description here

in addition

After you clear the project, you can also directly perform the following operation without Rebulid.
Insert image description here
This operation will generate a lot of data, and what you clear is actually this data.

Guess you like

Origin blog.csdn.net/qq_42489774/article/details/131661595