Skip to content
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 ':flutter_unity_widget:compileDebugKotlin' #981

Closed
chetu-ko opened this issue Aug 30, 2024 · 4 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@chetu-ko
Copy link

chetu-ko commented Aug 30, 2024

Hello,

I'm encountering a compilation error during the compileDebugKotlin task for the :flutter_unity_widget module in my Flutter app. The error message suggests a Gradle version mismatch, but I've double-checked and both versions seem to be the same.

What went wrong:
Execution failed for task ':flutter_unity_widget:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction  
Compilation error. See log for more details

Flutter App Version Details:

Flutter: 3.19.2
Gradle:
Distribution URL: Distribution https://services.gradle.org/distributions/gradle-7.6-bin.zip
Classpath: classpath 'com.android.tools.build:gradle:7.3.1'
Kotlin Version: ext.kotlin_version = '1.9.0'
Unity: 2023.2.20f

Build Configuration:

minSdkVersion: 26
targetSdkVersion: 34

Troubleshooting Steps Taken:

Verified Gradle version in build.gradle and distribution URL.
Rebuilt the Unity Library with the same Gradle and SDK versions.

Request for Help:

Despite the above steps, the issue persists. Any suggestions on how to resolve this compilation error would be greatly appreciated.

Desired Outcome:

To successfully build the Flutter app and the flutter_unity_widget module without compilation errors.

@timbotimbo
Copy link
Collaborator

timbotimbo commented Sep 3, 2024

I think the issue is that you are using Unity 2023.2.20.
The current master branch isn't compatible with 2023 and 6 on Android and will throw kotlin compilation errors, as these versions contain breaking changes on android.

Unity 6 (6000) is actually the rename of 2023.3, so I would suggest to either upgrade and try the experimental unity 6 support or drop down to Unity 2022.3.

@timbotimbo timbotimbo added the duplicate This issue or pull request already exists label Sep 3, 2024
@chetu-ko
Copy link
Author

chetu-ko commented Sep 3, 2024

@timbotimbo Thank you so much for the response, got it, I will try it.

@arjakroy
Copy link

arjakroy commented Sep 3, 2024

I downgrade my flutter SDK version from the latest to 3.22.0. it worked for me😁

@chetu-ko
Copy link
Author

Yes, @timbotimbo thank you, Downgrading the unity works the build, looking forward for the good support package for the new version Unity of 2023.2...

prefer using Unity version: 2022.3.43f1 this has very good working support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants