-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsf: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginplatform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
I'm trying to enable linting of Android native code in flutter/plugins, and ran into the following issue in essentially every plugin:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':integration_test:lintDebug'.
> Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
Errors found:
[...]/packages/integration_test/android/src/main/java/dev/flutter/plugins/integration_test/FlutterTestRunner.java:40: Error: Multi-catch with these reflection exceptions requires API level 19 (current min is 16) because they get compiled to the common but new super type ReflectiveOperationException. As a workaround either create individual catch statements, or catch Exception. [NewApi]
} catch (InstantiationException | IllegalAccessException e) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AFAICT because it's coming from integration_test I can't suppress it with a baseline file (since that's per-module). I'm still looking into whether there are other ways I can bypass just this error for now, but it's something could affect 3P plugins as well. We should ideally fix it in integration_test (especially since it sounds like it's an actual issue in the implementation).
/cc @blasten
hrishikesh-kadam
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsf: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginplatform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team