我一直在尝试构建这个项目,但我一直遇到这个问题。
D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
还有:
Execution failed for DexingNoClasspathTransform: /home/john/Music/flutter_application/build/image_picker_android/intermediates/runtime_library_classes_dir/debug.
> Error while dexing.
经过一系列调试会话并检查构建问题的可能解决方案后,我找不到任何解决方案。
我正在运行它:
Flutter 3.24.0 • channel stable • https://github.com/flutter/flutter.git
Java version: openjdk 21.0.4 2024-07-16
Gradle version 8.5
Firebase version 13.15.2
我的“build.gradle”:
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.flutter_application"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 24
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
multiDexEnabled true
}
拜托,我需要帮助来解决这个问题。
您是否使用了appcompat库并使用sdk 34编译? 如果是这样,只需删除appcompat lib并使用sdk 33