Error while building the app - flutter version 3.29.0
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. warning: [options] source value 8 is obsolete and will be removed in a future release warning: [options] target value 8 is obsolete and will be removed in a future release warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. /Users/karthikponnam/.pub-cache/hosted/pub.dev/appspector-0.10.0/android/src/main/java/com/appspector/flutter/AppSpectorPlugin.java:6: error: cannot find symbol import io.flutter.plugin.common.PluginRegistry.Registrar; ^ symbol: class Registrar location: interface PluginRegistry /Users/karthikponnam/.pub-cache/hosted/pub.dev/appspector-0.10.0/android/src/main/java/com/appspector/flutter/AppSpectorPlugin.java:37: error: cannot find symbol public static void registerWith(Registrar registrar) { ^ symbol: class Registrar location: class AppSpectorPlugin warning: unknown enum constant Include.NON_EMPTY reason: class file for com.fasterxml.jackson.annotation.JsonInclude$Include not found warning: unknown enum constant Include.NON_EMPTY /Users/karthikponnam/.pub-cache/hosted/pub.dev/appspector-0.10.0/android/src/main/java/com/appspector/flutter/MainAppSpectorHandler.java:202: warning: [deprecation] Handler() in Handler has been deprecated final Handler mainHandler = new Handler(); ^ 2 errors 6 warnings
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':appspector:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
- Try:
Run with --info option to get more log output. Run with --scan to get full insights.
BUILD FAILED in 9m 47s Error: Gradle task assembleDebug failed with exit code 1
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. warning: [options] source value 8 is obsolete and will be removed in a future release warning: [options] target value 8 is obsolete and will be removed in a future release warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. /Users/karthikponnam/.pub-cache/hosted/pub.dev/appspector-0.10.0/android/src/main/java/com/appspector/flutter/AppSpectorPlugin.java:6: error: cannot find symbol import io.flutter.plugin.common.PluginRegistry.Registrar; ^ symbol: class Registrar location: interface PluginRegistry /Users/karthikponnam/.pub-cache/hosted/pub.dev/appspector-0.10.0/android/src/main/java/com/appspector/flutter/AppSpectorPlugin.java:37: error: cannot find symbol public static void registerWith(Registrar registrar) { ^ symbol: class Registrar location: class AppSpectorPlugin warning: unknown enum constant Include.NON_EMPTY reason: class file for com.fasterxml.jackson.annotation.JsonInclude$Include not found warning: unknown enum constant Include.NON_EMPTY /Users/karthikponnam/.pub-cache/hosted/pub.dev/appspector-0.10.0/android/src/main/java/com/appspector/flutter/MainAppSpectorHandler.java:202: warning: [deprecation] Handler() in Handler has been deprecated final Handler mainHandler = new Handler(); ^ 2 errors 6 warnings
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':appspector:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
- Try:
Run with --info option to get more log output. Run with --scan to get full insights.
BUILD FAILED in 9m 47s Error: Gradle task assembleDebug failed with exit code 1
same issue, seems like we might have to fork
This issue has been fixed in this commit.
✅ The plugin now supports Flutter v2 embedding while maintaining backward compatibility. ✅ No more PluginRegistry.Registrar errors on Flutter 3.29+.
To use the fixed version, update your dependency to the latest GitHub version:
flutter_plugin:
git:
url: https://github.com/appspector/flutter-plugin.git
ref: b63b49c4d77986d8f084b752bf32b9d1522293a8
Then run:
flutter pub cache clean
flutter pub get
Everything should work fine now! 🚀 Let us know if you face any issues.