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

[Discussions] ohos example seems need some extra effort to run. #133

Open
techwn opened this issue May 7, 2024 · 6 comments
Open

[Discussions] ohos example seems need some extra effort to run. #133

techwn opened this issue May 7, 2024 · 6 comments
Assignees

Comments

@techwn
Copy link

techwn commented May 7, 2024

Content

Here is my flutter doctor:

% flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel master, 3.7.12-ohos, on macOS 14.4.1 23E224 darwin-x64, locale en-CN)
! Upstream repository [email protected]:openharmony-sig/flutter_flutter.git is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to [email protected]:openharmony-sig/flutter_flutter.git to dismiss this error.
[✓] HarmonyOS toolchain - develop for HarmonyOS devices
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[!] Android Studio (version 2023.3)
✗ Unable to find bundled Java version.
[✓] IntelliJ IDEA Community Edition (version 2024.1.1)
[✓] VS Code (version 1.89.0)
[✓] Connected device (3 available)
[!] HTTP Host Availability
✗ HTTP host "https://cocoapods.org/" is not reachable. Reason: An error occurred while checking the HTTP host: Failed host lookup: 'cocoapods.org'
✗ HTTP host "https://storage.flutter-io.cn" is not reachable. Reason: An error occurred while checking the HTTP host: Failed host lookup: 'storage.flutter-io.cn'

I have found two issues:

  1. there should have dta file in the example. without it, I can not build hap locally, so I copy one, it works fine. I noticed you add this to gitignore file.
  2. when I install the hap on real devices, and click the app icon to launch it, I encounter with black screen, I don't know why.
@zmtzawqlp
Copy link
Member

是的。我直接ignore了。因为太大了。。你可以在example 下面执行 flutter create --platform ohos . 来复制。。后续flutter sdk 也会重构。会自动复制这些文件的。

@techwn
Copy link
Author

techwn commented May 7, 2024

是的。我直接ignore了。因为太大了。。你可以在example 下面执行 flutter create --platform ohos . 来复制。。后续flutter sdk 也会重构。会自动复制这些文件的。

我尝试了重新生成 example,看起来也没啥变化。我比对了所有项目的 dta 文件都是一个 md5,应该是一样的。
但是还是黑屏。

@zmtzawqlp
Copy link
Member

是的。我直接ignore了。因为太大了。。你可以在example 下面执行 flutter create --platform ohos . 来复制。。后续flutter sdk 也会重构。会自动复制这些文件的。

我尝试了重新生成 example,看起来也没啥变化。我比对了所有项目的 dta 文件都是一个 md5,应该是一样的。 但是还是黑屏。

真机还是模拟器?

@zmtzawqlp
Copy link
Member

你到群里问吧 981630644

@techwn
Copy link
Author

techwn commented May 8, 2024

你到群里问吧 981630644

我是真机运行的,同样的环境跑 image_picker没有问题。
另外这是个什么群啊?我微信搜索不到。

@zmtzawqlp
Copy link
Member

你到群里问吧 981630644

我是真机运行的,同样的环境跑 image_picker没有问题。 另外这是个什么群啊?我微信搜索不到。

qq 群,插件我都跑过。具体环境你可以到群里讲下

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