➜ yechaoa_wanandroid_flutter git:(master) ✗ code ~/.bash_profile
➜ yechaoa_wanandroid_flutter git:(master) ✗ source ~/.bash_profile
jenv has been updated, process to refresh plugin links
➜ yechaoa_wanandroid_flutter git:(master) ✗ jenv local
11.0.11
➜ yechaoa_wanandroid_flutter git:(master) ✗ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
➜ yechaoa_wanandroid_flutter git:(master) ✗ .fvm/flutter_sdk/bin/flutter clean
Cleaning Xcode workspace... 3.4s
Deleting build... 82ms
Deleting .dart_tool... 2ms
Deleting Generated.xcconfig... 0ms
Deleting flutter_export_environment.sh... 0ms
Deleting .flutter-plugins-dependencies... 0ms
Deleting .flutter-plugins... 0ms
➜ yechaoa_wanandroid_flutter git:(master) ✗ .fvm/flutter_sdk/bin/flutter run
Running "flutter pub get" in yechaoa_wanandroid_flutter...
Resolving dependencies...
async 2.10.0 (2.11.0 available)
characters 1.2.1 (1.3.0 available)
collection 1.17.0 (1.17.2 available)
cookie_jar 3.0.1 (4.0.2 available)
cupertino_icons 0.1.3 (1.0.5 available)
dio_cookie_manager 2.1.4 (3.0.0 available)
file 6.1.4 (7.0.0 available)
js 0.6.5 (0.6.7 available)
matcher 0.12.13 (0.12.16 available)
material_color_utilities 0.2.0 (0.5.0 available)
meta 1.8.0 (1.9.1 available)
mime 0.9.7 (1.0.4 available)
path 1.8.2 (1.8.3 available)
share 0.6.5+4 (discontinued)
source_span 1.9.1 (1.10.0 available)
test_api 0.4.16 (0.6.0 available)
win32 4.1.4 (5.0.2 available)
Got dependencies!
Launching lib/main.dart on Pixel 4 in debug mode...
Warning: The plugin fluttertoast requires Android SDK version 31.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Warning: The plugin share requires Android SDK version 29.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Warning: The plugin shared_preferences_android requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
One or more plugins require a higher Android SDK version.
Fix this issue by adding the following to /Users/gongzelong/Android/study/yechaoa_wanandroid_flutter/android/app/build.gradle:
android {
compileSdkVersion 33
...
}
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: Errors limit exceeded. To receive all errors set com.sun.xml.bind logger to FINEST level.
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
*********************************************************
WARNING: This version of flutter_webview_plugin will break your Android build if it or its dependencies aren't compatible with AndroidX.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.
This warning prints for all Android build failures. The real root cause of the error may be unrelated.
*********************************************************
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @1e532918
* 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 25s
Running Gradle task 'assembleDebug'... 28.3s
Exception: Gradle task assembleDebug failed with exit code 1
Could anyone share the java version you use which can build and run this project correctly?