arcore_flutter_plugin icon indicating copy to clipboard operation
arcore_flutter_plugin copied to clipboard

Replace Sceneform with the maintained version

Open jakub-cosmose opened this issue 3 years ago • 5 comments

Google has abandoned Sceneform long time ago. The last version that they released has a lot of problems with rendering glb files created with the current software. There were plans to refactor the plugin to get rid of Sceneform completely, but it's a lot of work and nothing has happened. I think that we should, at least for now, replace the deprecated version of Sceneform with the maintained fork. I've performed the change locally and it works fine. I can make a pull request, if needed.

jakub-cosmose avatar Jan 26 '22 14:01 jakub-cosmose

Please do make the pull request. I'd like to check it out.

Saderis avatar Feb 01 '22 09:02 Saderis

I've made a PR https://github.com/giandifra/arcore_flutter_plugin/pull/167/files Unfortunately, this version doesn't support all the features handled by the example app, so making it production ready would require more work, but I think it's a good start. The use case that I use is my app is rendering a glb model downloaded from the network, anchored "in the air" in front of the user, and it works very well. The old version of Sceneform had problems with rendering some textures properly.

jakub-cosmose avatar Feb 01 '22 13:02 jakub-cosmose

hi @jakub-cosmose , thanks for replace the existing Sceneform with the community-maintained version. but after implementing your version, i have problem running the app to my phone and below are part of my errors:

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.android.filament.AndroidPlatform found in modules jetified-filament-android-1.15.1-runtime (com.google.android.filament:filament-android:1.15.1) and jetified-filament-android-1.17.1-runtime (com.google.ar.sceneform:filament-android:1.17.1) Duplicate class com.google.android.filament.AndroidPlatform21 found in modules jetified-filament-android-1.15.1-runtime (com.google.android.filament:filament-android:1.15.1) and jetified-filament-android-1.17.1-runtime (com.google.ar.sceneform:filament-android:1.17.1)

and this is how i implement your forked version in my pubspec.yaml: image

i tried flutter clean and run the app with Android Studio but still getting the errors. looking forward to your reply! Thanks in advance!

KennyChan94P avatar Apr 12 '22 14:04 KennyChan94P

hi @jakub-cosmose , thanks for replace the existing Sceneform with the community-maintained version. but after implementing your version, i have problem running the app to my phone and below are part of my errors:

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.android.filament.AndroidPlatform found in modules jetified-filament-android-1.15.1-runtime (com.google.android.filament:filament-android:1.15.1) and jetified-filament-android-1.17.1-runtime (com.google.ar.sceneform:filament-android:1.17.1) Duplicate class com.google.android.filament.AndroidPlatform21 found in modules jetified-filament-android-1.15.1-runtime (com.google.android.filament:filament-android:1.15.1) and jetified-filament-android-1.17.1-runtime (com.google.ar.sceneform:filament-android:1.17.1)

and this is how i implement your forked version in my pubspec.yaml: image

i tried flutter clean and run the app with Android Studio but still getting the errors. looking forward to your reply! Thanks in advance!

silly me! im seeing this kind of "Duplicate class" error because im using another plugin ar_flutter_plugin https://pub.dev/packages/ar_flutter_plugin which is still using the old Sceneform. please ignore my previous reply. thank you once again for migrating the Sceneform.

KennyChan94P avatar Apr 12 '22 14:04 KennyChan94P

hi @jakub-cosmose , thanks for replace the existing Sceneform with the community-maintained version. but after implementing your version, i have problem running the app to my phone and below are part of my errors: FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.android.filament.AndroidPlatform found in modules jetified-filament-android-1.15.1-runtime (com.google.android.filament:filament-android:1.15.1) and jetified-filament-android-1.17.1-runtime (com.google.ar.sceneform:filament-android:1.17.1) Duplicate class com.google.android.filament.AndroidPlatform21 found in modules jetified-filament-android-1.15.1-runtime (com.google.android.filament:filament-android:1.15.1) and jetified-filament-android-1.17.1-runtime (com.google.ar.sceneform:filament-android:1.17.1)

and this is how i implement your forked version in my pubspec.yaml: image i tried flutter clean and run the app with Android Studio but still getting the errors. looking forward to your reply! Thanks in advance!

silly me! im seeing this kind of "Duplicate class" error because im using another plugin ar_flutter_plugin https://pub.dev/packages/ar_flutter_plugin which is still using the old Sceneform. please ignore my previous reply. thank you once again for migrating the Sceneform.

This can working for ar_flutter_plugin?

jesulo avatar Jun 26 '24 11:06 jesulo