Comments (12)
I actually think I might have fixed it!
I manually removed the app from my emulator (went to the app drawer, long pressed, app info, uninstall) and it seems to be building again.
Thanks for the help in debugging this!
from flutter_secure_storage.
that’s great,
you are welcome.
from flutter_secure_storage.
After few hours of surfing. Finally SOLVED for me. Here is what I found out.
If you are calling flutter_secure_storage
(or any packages) method in background service (as example, when you are using notification onBackgroundMessage
). This exception occurred because usually our plugin registered at main.dart
in foreground, but if we are calling our plugin's method in background we need to manually registered our plugin in our app/src/main/[kotlin/java]/.../Application.[java or kt]
.
Inside the Application.java or Application.kt
After done that, do flutter run
again. Hope it helps!
from flutter_secure_storage.
Hi @Kyle-Mendes
is it iOS or Android?
Flutter has such issue from time to time. You need to force dependency update, e.g. add new plugin , get packages and remove the plugin. So it shouldn't be problem of this package.
from flutter_secure_storage.
Just tested, and I'm only getting the error on Android right now.
The steps I've tried
flutter doctor
flutter clean
- remove the
flutter_secure_storage
from~/.pub_cache
and thenflutter packages get
So are you suggesting
- add a package,
flutter packages get
, remove the package?
from flutter_secure_storage.
add a package, flutter packages get, remove the package?
yes, it should be the only step to solve.
try to add, get and remove e.g. https://pub.dartlang.org/packages/image_picker
The error means that native code was proper added as a dependency. If it doesn't help please share flutter doctor -v
from flutter_secure_storage.
That doesn't seem to have worked, unfortunately
• Flutter version 1.3.8 at /Users/user/Projects/flutter
• Framework revision e5b1ed7a7f (5 weeks ago), 2019-03-06 14:23:37 -0800
• Engine revision f4951df193
• Dart version 2.2.1 (build 2.2.1-dev.0.0 571ea80e11)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/user/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
• All Android licenses accepted.
[!] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
✗ ios-deploy not installed. To install:
brew install ios-deploy
! CocoaPods out of date (1.5.0 is recommended).
CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
For more info, see https://flutter.io/platform-plugins
To upgrade:
brew upgrade cocoapods
pod setup
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 22.2.1
• Dart plugin version 171.4424
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] VS Code (version 1.33.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.25.0
[✓] Connected device (2 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)
• iPhone X • AFE355F9-BD65-4E01-AD21-956C7163274B • ios • iOS 11.2 (simulator)
! Doctor found issues in 1 category.
from flutter_secure_storage.
I found this comment. Can you check
flutter/flutter#14137 (comment) ?
from flutter_secure_storage.
Just tried removing all of ios
and android
. Ran flutter create .
and then updated the gradle file to have the minSdk
for this package. I'm still encountering the title error however :(
EDIT: I also reset my computer and tried a different Flutter version, with no luck
from flutter_secure_storage.
Did you experience the same issue with another package with native plugins? Can you try any new package , eg Firebase or image pickers ?
from flutter_secure_storage.
I just tested a very simple app using the image_picker
that you shared before, and was able to get it to run.
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
void main() => runApp(MyHomePage());
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
var _image;
Future getImage() async {
var image = await ImagePicker.pickImage(source: ImageSource.camera);
setState(() {
_image = image;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Image Picker Example'),
),
body: Center(
child: _image == null ? Text('No image selected.') : Image.file(_image),
),
floatingActionButton: FloatingActionButton(
onPressed: getImage,
tooltip: 'Pick Image',
child: Icon(Icons.add_a_photo),
),
));
}
}
from flutter_secure_storage.
@Kyle-Mendes That also worked for me when nothing else was
from flutter_secure_storage.
Related Issues (20)
- Implementing encryption with the same logic as FlutterSecureStorage HOT 2
- Is this project still maintained? HOT 11
- I suspect a bug where my session keys are deleted and it causes my session to be logged out. HOT 15
- Could not find gradle-8.1.1.jar (com.android.tools.build:gradle:8.1.1)
- Libsecret issues on fedora 39 HOT 1
- Error when updating the flutter_secure_storage_platform_interface 1.1.0 HOT 5
- Flutter secure storage 8.1.0 no longer works HOT 19
- The specified item could not be found in the keychain HOT 49
- Message: The specified item already exists in the keychain, IOS HOT 24
- StorageCipher initialization failed cause by AndroidKeyStore not found HOT 2
- [bug] Race condition on `write` and `read`. HOT 2
- `deleteAll` not working on iOS HOT 3
- A problem occurred configuring project ':flutter_secure_storage'. HOT 1
- [Web] Encryption of saved value by app-specific key
- PlatformException: Code: -25308. Help me! HOT 11
- requires js ^0.6.3 depends on js ^0.7.1 HOT 6
- Beware the androidx.security:security-crypto is deprecated
- [WEB] Wasm support HOT 2
- onCupertinoProtectedDataAvailabilityChanged listener is not returning any value(true or false) even when isCupertinoProtectedDataAvailable is true HOT 6
- > Failed to transform android.jar to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_secure_storage.