wasabia / flutter_gl

cross-platform call OpenGL API by Dart through dart:ffi. Provides OpenGL with Texture Widget on Flutter.
243 stars 60 forks source link

Android Builds fail - Kotlin Gradle #51

Open ert485 opened 7 months ago

ert485 commented 7 months ago

I'm unable to build a flutter project that depends on the latest published version of flutter_gl (v0.0.21); I'm getting this error:

$ flutter run -d "SM G988W"
Launching lib/main.dart on SM G988W in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':flutter_gl' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61

my system environment:

$ flutter --version  
Flutter 3.13.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision d211f42860 (2 weeks ago) • 2023-10-25 13:42:25 -0700
Engine • revision 0545f8705d
Tools • Dart 3.1.5 • DevTools 2.25.0
$ sw_vers                
ProductName:            macOS
ProductVersion:         14.1
BuildVersion:           23B74
ert485 commented 7 months ago

I was able to get around it by:

(I also needed to increase the minimum android sdk version for my package minSdkVersion 24) (I also needed to copy the .aar file to my project)

nzcoderguy commented 6 months ago

Hi @ert485 how did you do the last two things (update minSdkVersion and copy the aar file to the project?)

ert485 commented 6 months ago

@nzcoderguy I edited my last comment with links to help with those

nzcoderguy commented 6 months ago

@ert485 thanks heaps!

duykhanp7 commented 4 months ago

@nzcoderguy I edited my last comment with links to help with those

I got the same problem :

But i have done increase the [minimum android sdk version 24 and add the .aar file, but it still not working.

ert485 commented 4 months ago

But i have done increase the [minimum android sdk version 24 and add the .aar file, but it still not working.

@duykhanp7

If you only did those two steps, you might also need to do the dependency_overrides step above. That allows you to include a fix that isn't published to pub yet