Open kumudamulgund opened 4 years ago
Did you find solution for this?
I was facing the same issue! dependencies: flutter: sdk: flutter cloud_firestore: ^0.14.0+2 firebase_core: ^0.5.0 firebase_mlkit_language: git: https://github.com/rishabnayak/firebase_mlkit_language
Using the dependency directly from git url made it work.
I have setup my Firebase project, included firebase_mlkit_language dependency in my pubspec.yaml file
dependencies: flutter: sdk: flutter firebase_mlkit_language: ^1.1.2 //Firebase ML kit firebase_core: ^0.4.0+9 firebase_auth: ^0.14.0+5
When, I run my app, I get the following error: Running Gradle task 'assembleDebug'... /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/LanguageTranslator.java:3: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/DownloadModel.java:3: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/LanguageIdentifier.java:3: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/DeleteModel.java:3: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/ViewModels.java:3: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/LanguageTranslator.java:70: error: cannot find symbol public void onFailure(@NonNull Exception e) { ^ symbol: class NonNull /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/LanguageTranslator.java:61: error: cannot find symbol public void onFailure(@NonNull Exception e) { ^ symbol: class NonNull /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/LanguageTranslator.java:54: error: cannot find symbol public void onSuccess(@NonNull String translatedText) { ^ symbol: class NonNull /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/DownloadModel.java:36: error: cannot find symbol public void onFailure(@NonNull Exception e) { ^ symbol: class NonNull /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/LanguageIdentifier.java:62: error: cannot find symbol public void onFailure(@NonNull Exception e) { ^ symbol: class NonNull /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/DeleteModel.java:32: error: cannot find symbol public void onFailure(@NonNull Exception e) { ^ symbol: class NonNull /opt/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/android/src/main/java/io/flutter/plugins/firebase_mlkit_language/ViewModels.java:42: error: cannot find symbol public void onFailure(@NonNull Exception e) { ^ symbol: class NonNull 12 errors
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':firebase_mlkit_language:compileDebugJavaWithJavac'.
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.