CariusLars / ar_flutter_plugin

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

Conflict with kotlin version #233

Open Abdulah-butt opened 2 months ago

Abdulah-butt commented 2 months ago

You need to update your package, flutter latest version requires higher kotlin version and this package depends upon lower. It's causing conflicts.

Abdulah-butt commented 2 months ago

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 ':ar_flutter_plugin' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

navin-zignuts commented 2 months ago

Hello, I faced the same issue. I have the project with the newer version and when I add a plugin then it gives me an error below 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 ':ar_flutter_plugin' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

How to fix this ?

ThomasVallee commented 1 month ago

Having the same issue @CariusLars

kerberosargos commented 1 month ago

Same issue has for me too.

BBBmau commented 3 weeks ago

same issue as well. is their an alternative for AR support in flutter?

Looks like the only way is to add this in natively. Where you use AndroidView to implement some native kotlin code that adds AR capability. Something like this:

class ARView extends StatefulWidget {
  @override
  _ARViewState createState() => _ARViewState();
}

class _ARViewState extends State<ARView> {
  static const platform = const MethodChannel('com.example.ar');

  @override
  Widget build(BuildContext context) {
    if (Theme.of(context).platform == TargetPlatform.iOS) {
      return UiKitView(
        viewType: 'arkit-view',
        onPlatformViewCreated: _onPlatformViewCreated,
      );
    } else {
      return AndroidView(
        viewType: 'arcore-view',
        onPlatformViewCreated: _onPlatformViewCreated,
        creationParams: <String, dynamic>{
          'showButton': true,
          'buttonText': 'AR Button',
        },
        creationParamsCodec: const StandardMessageCodec(),
      );
    }
  }

  void _onPlatformViewCreated(int id) {
    // Handle view creation
    print('AR view created with id: $id');

    platform.invokeMethod('initializeAR');
  }
}
hlefe commented 3 weeks ago

You can try my fork: https://pub.dev/packages/ar_flutter_plugin_flutterflow With a complete example in Flutterflow here: https://app.flutterflow.io/project/a-r-flutter-lib-ipqw3k

BBBmau commented 3 weeks ago

You can try my fork: https://pub.dev/packages/ar_flutter_plugin_flutterflow With a complete example in Flutterflow here: https://app.flutterflow.io/project/a-r-flutter-lib-ipqw3k

I'll give it a try later today!