Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thrio/navigator/PageRoutes.kt: (225, 34): Unresolved reference: removeLast #30

Closed
hw20101101 opened this issue Jun 2, 2021 · 7 comments
Assignees

Comments

@hw20101101
Copy link

hw20101101 commented Jun 2, 2021

Describe the bug
在 vs code 上面新建 flutter 项目之后,添加 thrio 2.0.11 依赖,然后在 荣耀v10 上面运行报错。

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
在手机上正常运行 flutter 项目

Flutter Doctor

[✓] Flutter (Channel stable, 2.2.1, on Mac OS X 10.15.7 19H15 darwin-x64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.56.2)

OS & Device

  • Device: 荣耀v10
  • OS: android 10
  • Version EMUI 10.0.0

Error logs

Launching lib/main.dart on BKL AL20 in debug mode...
lib/main.dart:1
e: /Users/xxx/Documents/xxx/flutter/.pub-cache/hosted/pub.flutter-io.cn/thrio-
2.0.11/android/src/main/kotlin/com/hellobike/flutter/thrio/navigator/PageRoutes.kt: (225, 34): 
Unresolved reference: removeLast

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':thrio:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 
Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 10s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

@foxsofter
Copy link
Contributor

还没试过这么新的版本,不过你先把这个点掉吧

✗ Android license status unknown.
  Run `flutter doctor --android-licenses` to accept the SDK licenses.

@hw20101101
Copy link
Author

OK,你的意思是说 flutter 的版本太新了?

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.1, on Mac OS X 10.15.7 19H15 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.56.2)
[✓] Connected device (2 available)

@foxsofter
Copy link
Contributor

是的,我目前还是 2.0.6

@hw20101101
Copy link
Author

hw20101101 commented Jun 2, 2021

我切换到 2.0.4 之后还是报这个错误。

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.4, on Mac OS X 10.15.7 19H15 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.56.2)
[✓] Connected device (2 available)

@foxsofter
Copy link
Contributor

那就升级你的 kotlin 版本吧

@hw20101101
Copy link
Author

我知道了,新建 flutter 项目之后,应该把你的 thrio demo 中的 example 目录下的 androidios 目录拷贝到新建的 flutter 项目中。

现在在安卓机运行成功,有些提示:


W/FlutterEngineCxnRegstry(24894): Attempted to register plugin (com.hellobike.flutter.thrio.ThrioPlugin@bbe1457) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@c6b5b44).
I/flutter (24894): [V] main
E/        (24894): APS:IFLoad:importExternalFunctions, search function createNewHwApsUtils failed, dlsym err:undefined symbol: createNewHwApsUtils
D/        (24894): APS:importExternalFunctions OK
I/HwViewRootImpl(24894): removeInvalidNode jank list is null

@foxsofter
Copy link
Contributor

你这。。。去好好看看官方文档

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants