CariusLars / ar_flutter_plugin

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

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

Open armaganwork opened 5 months ago

armaganwork commented 5 months ago

FAILURE: Build failed with an exception.

Omercodiea commented 5 months ago

same

uvlek commented 5 months ago

Same

sarabluekens commented 5 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!

armaganwork commented 5 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