Reputation: 17223
I am attempting to build a release apk for my app. And I get the following error
flutter build apk --release
$ flutter build apk --release
Initializing gradle... 2.8s
Resolving dependencies... 8.8s
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:dynamicProfileRuntimeClasspath'.
> Could not resolve project :flutter_image_compress.
Required by:
project :app
> Could not select value from candidates [null, debug, release] using AlternateDisambiguationRule.BuildTypeRule.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Any suggestions on why this issue might be happening ?
Upvotes: 3
Views: 763
Reputation: 555
This plugin "flutter_image_compression" is giving you an issue. This might be due to an incompatibility between the plugin and your project.
Few things you could try:
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}
If the problem still persists I suggest to try playing around with the build gradle version, etc. If all else failed, try submitting an issue on github to the author.
Upvotes: 2