git clone git@github.com:flutter/flutter.git
export PATH=$PATH:"$HOME/softwares/flutter/bin"
# using mirror
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
flutter doctor
# android studio -> preferences -> plugins
install Flutter plugin
# create a new project
file -> new project -> new flutter project
flutter pub get
cd android
./gradlew clean
./gradlew build
flutter run
flutter clean
sudo softwareupdate --install-rosetta --agree-to-license
# pubspec.yaml
flutter_openim_sdk:
path: ../Open-IM-SDK-Flutter
version: ^2.0.0+6
# *.dart
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
Flutter元老之一制作的code push平台。
flutter上加一层js实现热更
Running Gradle task 'assembleDebug'...
MoreSolution:
即使新建一个空的项目在android studio中使用可能因为网络导致被卡住,FLUTTER_STORAGE_BASE_URL
开启镜像后在命令行中执行flutter run
flutter doctor --android-licenses Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError
MoreMore2cd /Applications/Android\ Studio.app/Contents
ln -s $JAVA_HOME/../../ jre
flutter doctor -v
flutter doctor --android-licenses
RPC 失败。curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
网络问题 拷贝flutter git仓库到~/fvm/cache.git/
目录 再执行操作
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "RMI TCP Connection(2)-127.0.0.1"]
MoreSolution: I had the exact same issue on Android Studio and solved it by updating the Kotlin Gradle plugin from version 1.4.31 to version 1.5.30.
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30"
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.util.ResourceBundle.setParent(java.util.ResourceBundle) accessible: module java.base does not "opens java.util" to unnamed module @1fa268de