You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get the device camera example from the cookbook running but get the following compile error. I used the main.dart, camera.dart, picture.dart and pubspec.yaml file provided here without changing anything.
This is the error stack I am getting:
Running "flutter pub get" in camera_app...
The plugin firebase_mlkit_language uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
Launching lib/main.dart on HUAWEI TAG L21 in debug mode...
Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:138: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_HIGH);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:142: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_2160P);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:146: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_1080P);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:150: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_720P);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:154: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_480P);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:158: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_QVGA);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:162: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_LOW);
^
error: warnings found and -Werror specified
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:15: warning: [deprecation] MediaRecorder() in MediaRecorder has been deprecated
return new MediaRecorder();
^
1 error
8 warnings
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':camera: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.
BUILD FAILED in 1m 31s
*********************************************************
WARNING: This version of firebase_mlkit_language will break your Android build if it or its dependencies aren't compatible with AndroidX.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.
This warning prints for all Android build failures. The real root cause of the error may be unrelated.
*********************************************************
Exception: Gradle task assembleDebug failed with exit code 1
The text was updated successfully, but these errors were encountered:
Hi!
I am trying to get the device camera example from the cookbook running but get the following compile error. I used the main.dart, camera.dart, picture.dart and pubspec.yaml file provided here without changing anything.
This is the error stack I am getting:
Running "flutter pub get" in camera_app...
The plugin
firebase_mlkit_language
uses a deprecated version of the Android embedding.To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
Launching lib/main.dart on HUAWEI TAG L21 in debug mode...
Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:138: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_HIGH);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:142: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_2160P);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:146: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_1080P);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:150: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_720P);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:154: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_480P);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:158: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_QVGA);
^
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:162: warning: [deprecation] get(int,int) in CamcorderProfile has been deprecated
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_LOW);
^
error: warnings found and -Werror specified
/Users/stefvenmans/Development/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.7.0+4/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:15: warning: [deprecation] MediaRecorder() in MediaRecorder has been deprecated
return new MediaRecorder();
^
1 error
8 warnings
FAILURE: Build failed with an exception.
Execution failed for task ':camera: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.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 31s
*********************************************************
WARNING: This version of firebase_mlkit_language will break your Android build if it or its dependencies aren't compatible with AndroidX.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.
This warning prints for all Android build failures. The real root cause of the error may be unrelated.
*********************************************************
Exception: Gradle task assembleDebug failed with exit code 1
The text was updated successfully, but these errors were encountered: