juicycleff / flutter-unity-arkit-demo

This demo uses flutter unity view widget to show AR KIT with Unity3D
230 stars 76 forks source link

ImageTracking is not working while others seems working great #13

Closed what2003 closed 3 years ago

what2003 commented 3 years ago

Other scenes worked just fine, only ImageTracking is not working. It showed "No resource group with name "ReferenceImageLibrary_B3FB7092-C2DA-7A4B-AD1E-35B555085B9D" found", so I rebuilt the ReferenceImageLibrary and use cube as prefab, still failed. unity : 2019.4.3f1 IOS $ flutter doctor -v [✓] Flutter (Channel dev, 2.3.0-12.1.pre, on Mac OS X 10.15.4 19E287 darwin-x64, locale zh-Hans) • Flutter version 2.3.0-12.1.pre at /Users/jack/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f9c825981c (9 weeks ago), 2021-05-18 14:07:52 -0700 • Engine revision 26e217e6c3 • Dart version 2.14.0 (build 2.14.0-edge.a527411e5100a0a4f48c4009087a1b988aa784af) • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at /Users/jack/Library/Android/sdk • Platform android-30, build-tools 29.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.1, Build version 12A7403 • CocoaPods version 1.10.1

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 45.1.1 • Dart plugin version 192.7761 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.58.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.24.0

[✓] Connected device (2 available) • 吴杰的 iPhone7 (mobile) • eed6e3b2d815420621d441672707634130e89e16 • ios • iOS 13.5.1 • Chrome (web) • chrome • web-javascript • Google Chrome 83.0.4103.61 ! Error: 吴杰的 iPhone7 is busy: Copying cache files from device. Xcode will continue when 吴杰的 iPhone7 is finished. (code -10)

• No issues found!

$ flutter run ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Warning ────────────────────────────────────────────────────────────────────────────── Your Flutter application is created using an older version of the Android embedding. It's being deprecated in favor of Android embedding v2. Follow the steps at

https://flutter.dev/go/android-project-migration

to migrate your project. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Launching lib/main.dart on 吴杰的 iPhone7 in debug mode... Warning: Missing build name (CFBundleShortVersionString). Warning: Missing build number (CFBundleVersion). Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store. Automatically signing iOS for device deployment using specified development team in Xcode project: 65TSJ9E93J Running Xcode build...
└─Compiling, linking and signing... 10.7s Xcode build done. 32.3s iOS Observatory not discovered after 30 seconds. This is taking much longer than expected... Installing and launching... 73.2s Syncing files to device 吴杰的 iPhone7... 121ms

Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h List all available interactive commands. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device).

Running with unsound null safety For more information see https://dart.dev/null-safety/unsound-null-safety

An Observatory debugger and profiler on 吴杰的 iPhone7 is available at: http://127.0.0.1:63023/XW6bxyhUcB0=/ The Flutter DevTools debugger and profiler on 吴杰的 iPhone7 is available at: http://127.0.0.1:9102?uri=http%3A%2F%2F127.0.0.1%3A63023%2FXW6bxyhUcB0%3D%2F Built from '2019.4/china_unity/release' branch, Version '2019.4.3f1 (ac4571766456)', Build type 'Release', Scripting Backend 'il2cpp' -> applicationDidFinishLaunching()

Setting UIViewControllerBasedStatusBarAppearance to NO is no longer supported. Apple actively discourages that, and all application-wide methods of changing status bar appearance are deprecated

-> applicationDidBecomeActive() [Subsystems] Discovering subsystems at path /var/containers/Bundle/Application/30566353-BB21-42B5-AA10-47D62C5ADD88/Runner.app/Frameworks/UnityFramework.framework/Data/UnitySubsystems [Subsystems] No descriptors matched for examples in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json. [Subsystems] 1 'inputs' descriptors matched in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json [Subsystems] No descriptors matched for displays in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json. [Subsystems] No descriptors matched for meshings in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json. Initializing Metal device caps: Apple A10 GPU Initialize engine version: 2019.4.3f1 (ac4571766456) flutter: **** flutter: Controller setup complete flutter: **** Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x11e7902f0>. UnloadTime: 0.357708 ms [Subsystems] Loading plugin UnityARKit for subsystem ARKit-Input... [Subsystems] UnityARKit successfully registered Provider for ARKit-Input Setting up 1 worker threads for Enlighten. Thread -> id: 16dc6b000 -> priority: 1 flutter: Selected 11 UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) GameManager:LoadGameScene(String)

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Unloading 4 Unused Serialized files (Serialized files now loaded: 0) UnloadTime: 3.833042 ms [General] No resource group with name "ReferenceImageLibrary_B3FB7092-C2DA-7A4B-AD1E-35B555085B9D" found InvalidOperationException: Failed to resolve image library 'ReferenceImageLibrary'. There is no matching resource group, or the resource group does not contain any reference images. at UnityEngine.XR.ARKit.ARKitImageDatabase..ctor (UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary serializedLibrary) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.XR.ARKit.ARKitImageTrackingSubsystem+ARKitProvider.CreateRuntimeLibrary (UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary serializedLibrary) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem.CreateRuntimeLibrary (UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary serializedLibrary) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.XR.ARFoundation.ARTrackedImageManager.OnBeforeStart () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.XR.ARFoundation.SubsystemLifecycleManager`2[TSubsystem,TSubsystemDescriptor].OnEnable () [0x00000] in <00000000000000000000000000000000>:0

(Filename: currently not available on il2cpp Line: -1)

[Subsystems] Loading plugin UnityARKit for subsystem ARKit-Input... [Subsystems] UnityARKit successfully registered Provider for ARKit-Input

Unloading 28 unused Assets to reduce memory usage. Loaded Objects now: 1002. Total: 2.377000 ms (FindLiveObjects: 0.246375 ms CreateObjectMapping: 0.025875 ms MarkObjects: 1.918542 ms DeleteObjects: 0.185500 ms)

[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method dispose on channel unity_view_0)

0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)

#1 UnityWidgetController._dispose (package:flutter_unity_widget/flutter_unity_widget.dart:55:5) Application finished.
what2003 commented 3 years ago

I have built two unity2019.4.3f1 ArFoundation3 scenes myself, plane finder and ImageTracking. They are all working fine on Iphone by unity built. By flutter, plane finder is ok, ImageTraking still has same problem.

[General] No resource group with name "ReferenceImageLibrary_B3FB7092-C2DA-7A4B-AD1E-CE6A5DE9A3D7" found InvalidOperationException: Failed to resolve image library 'ReferenceImageLibrary'. There is no matching resource group, or the resource group does not contain any reference images.