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)
- Reading a specific key or using read all returns a null from the store HOT 1
- Running on web fails when _selectOptions are called
- Recording with encrypted data HOT 1
- Linux read always empty
- Cannot compile my project with AGP >=8.0.0 due to R8 error HOT 3
- I am trying to save data but for some reason it is not saved on Flutter web (Chrome)
- app run crash on macos m1 pro HOT 2
- After reopen application, getting null values in IOS. But working in Android. HOT 10
- flutter_secure_storage for web get error: type LegacyJavaScriptObject is not a subtype of FutureOr<CryptoKey> HOT 2
- Error while reading data on windows HOT 1
- SHA-1 is a weak hash known to have hash collisions. HOT 4
- App uses the encryption mode CBC with PKCS5/PKCS7 padding HOT 1
- After reopen application, getting null values in IOS. But working in Android HOT 2
- Null check operator used on a null value HOT 1
- iOS: Breaking Change from 9.1.x forward, causing loss of data HOT 12
- Datas are not removed when app is uninstalled - I0S HOT 3
- [Android] [Beta] Version 10 - Full migration to custom implementation of SecureSharedPreferences HOT 9
- pod player video not play
- Unable to build the library in NixOS HOT 1
- [BUG] [WEB] unable to load from storage after F5 page refresh HOT 4
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.