CariusLars / ar_flutter_plugin

Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
MIT License
333 stars 254 forks source link

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. #216

Open ghost opened 10 months ago

ghost commented 10 months ago

FAILURE: Build failed with an exception.

Omercodiea commented 10 months ago

same

uvlek commented 10 months ago

Same

sarabluekens commented 10 months ago

This basically means that the gradle version used in the plugin itself is outdated.

I was able to solve this error by manually upgrading the org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 in the AR plugin itself. -> you can edit the source code of plugins in Android Studio. (as far as i know, not in VsCode)

Steps I took: 1)Open project in Android Studio, 2) Below project there should be a folder "External Libraries" (If you cant see the external libraries, make sure project is selected in the dropdown)

image

3) Open External Libraries>Flutter plugins>ar_flutter_plugin>android>build.gradle 4) In that file, update the ext.kotlin.version.

buildscript {
    ext.kotlin_version = '1.5.20'
}

Hope this solves it for you!

ghost commented 10 months ago

This basically means that the gradle version used in the plugin itself is outdated.

I was able to solve this error by manually upgrading the org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 in the AR plugin itself. -> you can edit the source code of plugins in Android Studio. (as far as i know, not in VsCode)

Steps I took: 1)Open project in Android Studio, 2) Below project there should be a folder "External Libraries" (If you cant see the external libraries, make sure project is selected in the dropdown) image

  1. Open External Libraries>Flutter plugins>ar_flutter_plugin>android>build.gradle
  2. In that file, update the ext.kotlin.version.
buildscript {
    ext.kotlin_version = '1.5.20'
}

Hope this solves it for you!

thanks

rrsaikat commented 3 months ago
buildscript {
    ext.kotlin_version = '1.9.0'
}

Above version worked for me!