I am building an application that is using firebase_auth service and firebase_ml_vision service. Both work great when done individually, but when I tried to integrate them, the build is going successful but application stops working in android after build execution. Is there any solution to this?

I have tried using the downgraded versions of the services. But there is no change. I even tried removing some UI widgets hoping they would create some error, unfortunately, this also didn't work.

  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2
  firebase_core: ^0.3.4
  firebase_auth: ^0.8.4+5
  google_sign_in: ^4.0.1+3
  image_picker:  ^0.6.0+1
  firebase_ml_vision: ^0.2.0+1 ```

The result I am getting even when I use the AndroidX compatibilities.

Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                              1.4s
Resolving dependencies...                                           6.7s
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\BarcodeDetector.java:5: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\CloudLabelDetector.java:3: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\FaceDetector.java:3: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\LabelDetector.java:3: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\TextRecognizer.java:5: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\BarcodeDetector.java:238: error: cannot find symbol
              public void onFailure(@NonNull Exception exception) {
                                     ^
  symbol: class NonNull
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\CloudLabelDetector.java:73: error: cannot find symbol
              public void onFailure(@NonNull Exception e) {
                                     ^
  symbol: class NonNull
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\FaceDetector.java:96: error: cannot find symbol
              public void onFailure(@NonNull Exception exception) {     
                                     ^
  symbol: class NonNull
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\LabelDetector.java:70: error: cannot find symbol
              public void onFailure(@NonNull Exception e) {
                                     ^
  symbol: class NonNull
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_ml_vision-0.2.1\android\src\main\java\io\flutter\plugins\firebasemlvision\TextRecognizer.java:108: error: cannot find 
symbol
              public void onFailure(@NonNull Exception exception) {
                                     ^
  symbol: class NonNull
10 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':firebase_ml_vision:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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 4s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                         5.1s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
*******************************************************************************************
Gradle task assembleDebug failed with exit code 1