-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execution failed for task ':unityLibrary:BuildIl2CppTask'. #440
Comments
same error, any solution? |
I found a solution that works for me. With all this, I can compile for Android. |
Hi guys, |
Hello folks, I faced the same situation using Unity version 2021.1.12f1. I downgraded to NDK 19 and did not work. Upon further investigation it seems this is related to a mismatch of the Unity NDK version and the version installed with Android Studio, once the two version matched I was able to build fine. Steps:
Hope this helps, |
I followed the steps @CodeMinion mentioned, and moved from that error to another :)
Googling that issue I found that it may relate to build tools. But.. I can't get what exactly is wrong here.
UPDATE |
To anyone still facing this issue, in my case it was a flutter error. Currently the flutter snap package seems broken and installing it manually fixed the issue for me. |
I ensured the NDK referenced in my Flutter project's 'local.properties' file was pointing to the same NDK version used in Unity, and that solved it for me. |
I found a solution that works for me. |
Hi, I tries all the above mentioned methods for this issue, none of them worked. Any more ideas ? |
Open your unity project go to Edit->Preferences->ExternalTool and copy NDK path, Now open your flutter project local.properties and paste that path at ndk.dir like this - |
This work for me directly. Thank @arshad-dqot . |
On March 29, 2023 2:01:28 AM PDT, Sai Lin Htut ***@***.***> wrote:
> Open your unity project go to Edit->Preferences->ExternalTool and copy NDK path, Now open your flutter project local.properties and paste that path at ndk.dir
>
> like this - `ndk.dir=C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.9f1\\Editor\\Data\\PlaybackEngines\\AndroidPlayer\\NDK`
This work for me directly. Thank @arshad-dqot .
I've been wondering if there it was likely to cause problems having Android Studio's SDK and tools and Unity's.
I just began changing part of a shipping app to Unity.
I keep having trouble with these lines the export adds in the unityLibrary/build.gradle file:
buildToolsVersion '32.0.0'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
|
This worked for me thanks. |
This other solution worked for me:
8- Now you can run the build again |
I have tried many ways to run simple unity android code but at last I am able to run the build properly good with ndkVersion 19.2.5345600 |
Following all steps, when I try to compile from Flutter to a real Android device, I´m getting this error:
I´m getting the same result using Mac OS with Catalina and tested as well in Mac Os with Big Sur.
I have NDK installed, and I have disabled the mac security with:
sudo spctl --master-disable
Nothing works.
Unity (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: