flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

[Android][Question] The plugin `flutter_secure_storage` requires your app to be migrated to the Android embedding v2

Open yongiljang opened this issue 1 year ago • 6 comments

Please, look at following steps. I've tried to solve this but couldn't find any solutions.

thank you!

` mkdir packages cd packages flutter create --template=package <package-project_name> cd <package-project_name> flutter pub add flutter_secure_storage

This app is using a deprecated version of the Android embedding. To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding. Take a look at the docs for migrating an app: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects The plugin flutter_secure_storage requires your app to be migrated to the Android embedding v2. Follow the steps on the migration doc above and re-run this command. exit code 1 `

yongiljang avatar Mar 30 '23 22:03 yongiljang

Can you post the output of flutter doctor -v?

juliansteenbakker avatar Mar 31 '23 06:03 juliansteenbakker

Here it is.

` flutter doctor -v
[✓] Flutter (Channel stable, 3.7.8, on macOS 13.2.1 22D68 darwin-arm64, locale ko-KR) • Flutter version 3.7.8 on channel stable at /Users/yongiljang/dev/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 90c64ed42b (10일 전), 2023-03-21 11:27:08 -0500 • Engine revision 9aa7816315 • Dart version 2.19.5 • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at /Users/yongiljang/Library/Android/sdk • Platform android-33, build-tools 33.0.1 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14C18 • CocoaPods version 1.11.3

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.76.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.60.0

[✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 13.2.1 22D68 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.146

[✓] HTTP Host Availability • All required HTTP hosts are available

• No issues found! `

yongiljang avatar Mar 31 '23 06:03 yongiljang

I am running into this issue trying to debug for iOS!

gisborne avatar Apr 14 '23 18:04 gisborne

Having the same issue! Haven't be able to resolve

jannisnikoy avatar Jun 30 '23 04:06 jannisnikoy

A quick note if someone struggles with this - in order to use flutter_secure_stoage as a local package after you've done flutter create --template=package <package-project_name> you can just remove platform (android, ios, linux, windows, mac) folders from the package you've created (since they are useless anyway as you've done nothing but only created empty package - you don't actually have anything under platform folders)

Then, everything will work correctly

nmarko91 avatar Jul 05 '23 11:07 nmarko91

Same error here

tairoroberto avatar Aug 16 '23 17:08 tairoroberto

I am closing all older issues. If this issue still exists in the latest version, please let me know.

juliansteenbakker avatar Aug 13 '24 20:08 juliansteenbakker