juicycleff / flutter-unity-view-widget

Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
BSD 3-Clause "New" or "Revised" License
2.13k stars 518 forks source link

Cannot build example #837

Closed nebis-software closed 1 year ago

nebis-software commented 1 year ago

Describe the bug I would like to test this library, and I started with cloning the repo and building the example. I get errors (see below) It seems to me as related to an older gradle version, but I don't know how to proceed... Thanks!

To Reproduce Steps to reproduce the behavior:

git clone git@github.com:juicycleff/flutter-unity-view-widget.git
cd flutter-unity-view-widget.git/example
dart pub get
flutter run -v
..............
[  +99 ms] Compiling settings file '/home/user/project/PoC-flutter-3d/flutter-unity-view-widget/example/android/settings.gradle' using BuildScriptTransformer.
[ +101 ms] FAILURE: Build failed with an exception.
[  +12 ms] * What went wrong:
[        ] Could not open settings generic class cache for settings file '/home/user/project/PoC-flutter-3d/flutter-unity-view-widget/example/android/settings.gradle'
(/home/user/.gradle/caches/6.5/scripts/25aorcp10u58z2dyk7lm4qet/settings6418c6d726070f323dbddda2aadc82ef).
[   +8 ms] > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 61
[        ] * Try:
[        ] Run with --debug option to get more log output. Run with --scan to get full insights.
[        ] * Exception is:
[        ] org.gradle.cache.CacheOpenException: Could not open settings generic class cache for settings file
'/home/user/project/PoC-flutter-3d/flutter-unity-view-widget/example/android/settings.gradle'
(/home/user/.gradle/caches/6.5/scripts/25aorcp10u58z2dyk7lm4qet/settings6418c6d726070f323dbddda2aadc82ef).
[        ]  at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:80)

I am using the following versions:


flutter doctor -v
[✓] Flutter (Channel stable, 3.10.5, on Ubuntu 22.04.2 LTS 5.15.0-75-generic, locale en_US.UTF-8)
    • Flutter version 3.10.5 on channel stable at /home/user/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 796c8ef792 (3 weeks ago), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/user/Android/Sdk/
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /snap/android-studio/126/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2022.2)
    • Android Studio at /snap/android-studio/126/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.79.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.68.0

[✓] Connected device (3 available)
    • Redmi 3S (mobile) • zzzzzzzzzzzzz • android-arm64  • Android 10 (API 29)
    • Linux (desktop)   • linux        • linux-x64      • Ubuntu 22.04.2 LTS 5.15.0-75-generic
    • Chrome (web)      • chrome       • web-javascript • Google Chrome 114.0.5735.133

[✓] Network resources
    • All expected network resources are available.

Unity (please complete the following information):

RoyalCoder88 commented 1 year ago

Hi @nebis-software you need to install Unity and perform export first

nebis-software commented 1 year ago

Sorry I missed that part 😿 I will try, thanks