1
wuliaoshixia OP Android 开发的 JDK 使用的是 Zulu OpenJDK
|
2
leo7723 2021-02-04 09:02:55 +08:00 1
单独打开安卓项目 RUN 一遍看下,至少报错会更详细一些。
有可能和机器没有关系。 |
3
zeropercenthappy 2021-02-04 09:18:16 +08:00
这描述没法判断是机器的问题。
flutter-sdk/packages/flutter_tools/gradle/flutter.gradle 设置好镜像。 试试挂代理或者用手机热点再试试,可能是网络问题,其它依赖没下下来。 |
4
Carver9527 2021-02-04 09:40:45 +08:00 via iPhone
加个编译参数 v,把详细的日志打出来,看看卡在哪一步了
|
5
bullettrain1433 2021-02-04 09:46:04 +08:00
flutter 安装时候 termimal 用 rossetta 打开
|
6
HarryQu 2021-02-04 09:51:10 +08:00
M1 的编译速度可以提升这么多的吗?
|
7
hongch 2021-02-04 09:58:45 +08:00
“发现 Gradle-6.7-all.zip 下载正常“
那不就是正在下载 gradle 吗,你直接用 android studio 打开 Android 工程,在 android 工程下跑./gradlew assembleDebug 看进度 |
8
DGideas 2021-02-04 10:03:15 +08:00
XDM 是啥,“兄弟们”?没别的意思哈,看着怎么这么奇怪呢 。。
|
9
janxin 2021-02-04 10:17:58 +08:00
之前看了一下 M1 下面这么折腾,我都是劝人还不如暂时不要用它做安卓相关开发。
Flutter 的支持目前也不好,开发的 M1 设备才拿到没几天,要完全兼容大概一段时间。而且现在要跑在 Rosetta 2 下面,不如 LZ 你看一下你的所有的环境是不是都跑在 Rosetta 2 下了? |
10
unmois 2021-02-04 10:39:18 +08:00
宁是胡萝卜大佬吗
|
11
limerence12138 2021-02-04 11:01:03 +08:00
Android studio 还是没有原生适配啊,用起来卡卡的,还有一些页面会卡死
|
12
Richy 2021-02-04 14:19:41 +08:00
Android:目前 Android Studio 还没有适配 M1,可以用 IDEA 代替,不过目前 AGP 版本 4.1.1 无法直接安装 apk,需要新建 gradle 任务 [installDebug] ,每次安装后要手动打开 app,不知道有没有同学有解决方案
Flutter: 目前在用 VS Code Insiders 版本,暂时没有什么问题。gradle 运行慢大多是因为下载 gradle 太慢了。 |
13
wuliaoshixia OP @Carver9527
flutter doctor -v [✓] Flutter (Channel beta, 1.25.0-9.0.pre.2, on macOS 11.2 20D64 darwin-arm, locale zh-Hans-CN) • Flutter version 1.25.0-9.0.pre.2 at /Users/sheep/Project/flutter_beta • Framework revision 5d36f2e7f5 (3 weeks ago), 2021-01-14 15:57:49 -0800 • Engine revision 7a8f8ca02c • Dart version 2.12.0 (build 2.12.0-133.7.beta) • 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 30.0.3) • Android SDK at /Users/sheep/Library/Android/sdk • Platform android-30, build-tools 30.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_242-release-1644-b3-6915495) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1 [✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • 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 1.8.0_242-release-1644-b3-6915495) [✓] Connected device (1 available) • SKW A0 (mobile) • 7692d5ee • android-arm64 • Android 10 (API 29) |
14
wuliaoshixia OP @hongch gradle 应该是下载下来了,执行 flutter run -v,发现卡在下面这个步骤了
[ +914 ms] Welcome to Gradle 6.7! [ ] Here are the highlights of this release: [ ] - File system watching is ready for production use [ ] - Declare the version of Java your build requires [ ] - Java 15 support [ ] For more details see https://docs.gradle.org/6.7/release-notes.html [ +187 ms] Starting a Gradle Daemon, 3 busy Daemons could not be reused, use --status for details |
15
wuliaoshixia OP 找到原因了,原来是依赖没有下载下来😂
[+378206 ms] FAILURE: Build failed with an exception. [ +12 ms] * What went wrong: [ ] A problem occurred configuring root project 'android'. [ ] > Could not resolve all artifacts for configuration ':classpath'. [ ] > Could not download kotlin-compiler-embeddable-1.3.50.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50) [ ] > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'. [ ] > Read timed out [ ] > Could not download kotlin-daemon-embeddable-1.3.50.jar (org.jetbrains.kotlin:kotlin-daemon-embeddable:1.3.50) [ ] > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-daemon-embeddable/1.3.50/kotlin-daemon-embeddable-1.3.50.jar'. [ ] > Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-daemon-embeddable/1.3.50/kotlin-daemon-embeddable-1.3.50.jar'. [ +17 ms] > Remote host closed connection during handshake [ ] * 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 6m 19s |
16
wuliaoshixia OP @zeropercenthappy 果然还是得用梯子先下一下依赖。。。
|