Error while running app in debug mode and while building release apk in flutter - flutter

My flutter sdk version is 2.2.1 and dart sdk version is 2.13 . Flutter doctor shows everything is fine. Problem occurred while building release apk for the first time. After that running in debug mode shows error also! here is the pic

please change your java SDK 7 to Java 8 to support lambda expressions.

Related

Newly created flutter app fails to build iOS

I am using flutter to build an App for IOS and I manage to create the project smoothly. Before I put any code or dependencies I run flutter build apk and this builds the apk successfully. I then run flutter build ios and I get this error Failed to package... Command PhaseScriptExecution failed with a nonzero exit code.
I have run flutter doctor and I have no issues. I am running latest flutter version Channel stable, 2.8.0. Latest android studio version 2020.3(Arctic Fox). Latest Xcode 13.1 Release. And Latest MacOs Monterey 12.0.1.
I have tried all solutions I could google but nothing works. Why would it not run when i have not even added any of my code. Just a clean project getting stuck.
Any help is very much appreciated. Thanx

SDK android emulator for flutter

I am installing andoid sdk in Intelli idea the error occuring in installation is :
"java.io.IOException: Connection closed at byte 45350576. Expected 326723360 bytes.
Warning: An error occurred while preparing SDK package Android Emulator: Connection closed at byte 45350576. Expected 326723360 bytes.."
I have downloaded and installed Intelli Idea have also installed flutter and dart PLUGINS now for i need emulator for it which i think is inside android sdk but its giving this error while installing it, I am basically learning dart flutter app development . please guide here how to use emulator using android sdk or anyway other than android sdk,

seems no-sound-null-safety parameter not work in flutter 2.2.1

I am upgrade my flutter to version 2.2.1, but it seems --no-sound-null-safety no longer avaliable when build the ios package. I am build the project using this command:
~/apps/flutter/bin/flutter build ios --release --no-codesign --no-sound-null-safety
but the output still tell me some package did not support null safety:
Changing current working directory to: /Users/dolphin/source/cruise-open
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.earth.dolphin for device (ios-release)...
Running Xcode build...
Xcode build done. 36.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
2 warnings generated.
2 warnings generated.
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:state_notifier
- package:fish_redux
- package:flutter_icons
For solutions, see https://dart.dev/go/unsound-null-safety
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
note: Removed stale file
Encountered error while building for device.
is there any solution with this problem? I am search from flutter issue but no one confirm this problem(https://github.com/flutter/flutter/issues/84199), is it a bug of new version?(Because I am using this command works fine until I upgrade to version 2.2.1). is there other way to pass no-sound-null-safety parameter? I have tried many version and found some version works fine, some version did not works. Maybe a flutter bug.
flutter 2.0.1 works
flutter 2.0.3 works
flutter 2.0.6 works
flutter 2.2.0 not works
flutter 2.2.1 not works
flutter 2.2.2 not works
flutter 2.2.3 not works
seem a bug, will fixed next release:https://github.com/flutter/flutter/pull/84372

Flutter code not compiling after upgrade to version 1.27.0-8.0.pre

I'm trying to run my desktop flutter application. Since i've upgraded my flutter version to dev channel (flutter version 1.27.0-8.0.pre), code is not compiling after that. It shows following error on code compilation.
Please help me out. Thanks

Flutter crash on release apk installed on devices / Emulator

Could you guys please help me with the problems I currently have?
I'm trying to follow the steps of how to release apk android from: https://flutter.dev/docs/deployment/android, The program which I tried to release is only the NewFlutterApplication which created from template of Flutter
The problem is: Have been followed all the steps, still I can't run the release apk which i build from flutter
The Error which I got:
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install E:\FlutterProject\flutter_app_1\build\app\outputs\apk\app.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
Install failed
The things that I have tried:
Tried from this site Flutter release apk is not installing on device, but there is no hope
Tried from this site Can't build release APK for flutter, but still no hope
Tried using the flutter run --release in the real device, it's directly crash and return stopped working
Tried using the flutter build apk && flutter install, it's not running and give the error from top error
Tried using flutter run -v it don't give any error and run smoothly and the debug it's still run smoothly, only the release APK is the problem which can't be run
UPD: This answer is outdated, Flutter now supports x86/x64
You can't run release build on emulator, because currently flutter doesn't support x86 release binaries
See this issue, and put thumb up reaction on it to increase priority:
https://github.com/flutter/flutter/issues/9253
This issue also affects devices that use Intel Atom and some Chromebooks, but don't worry, they will be excluded from supported devices by Google Play automatically
INSTALL_FAILED_NO_MATCHING_ABIS is when you are trying to install an app that has native libraries and it doesn't have a native library for your cpu architecture. For example if you compiled an app for armv7 and are trying to install it on an emulator that uses the Intel architecture instead it will not work.