Questions about updating Gradle in Android Studio - flutter

I am working through the Net Ninja YouTube tutorial for Flutter. I just updated Flutter (or maybe Android Studio, whichever is arctic fox?) and now I am getting this error message whenever I try to run any basic app.
Launching lib/main.dart on sdk gphone64 arm64 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
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app.apk...
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install /Users/dillonbond/AndroidStudioProjects/testapp3/build/app/outputs/flutter-apk/app.apk: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
Error launching application on sdk gphone64 arm64.
A google search led me to
when I try to "sync project with gradle files" a warning pops up
People are saying I need to update Gradle. The click through solutions from this page are outdated or gone for me. Where do I input
codecompileSdkVersion(30)
buildToolsVersion("30.0.3")
solutions like this at? Do I put them somewhere in Android Studio in a dart file? Do I enter them into my command terminal? (I'm on a Mac).
All I know about Android Studio is the basic stuff from YouTube, I am very lost here. My programming skills are rudimentary. I'm not completely sure that the linked article even applies to my situation. I installed AS through the home brew pub thing if that makes any difference.
Thanks a million in advance to anyone that can help! I seriously appreciate it!

It is already mentioned in your error that it is due to insufficient storage, delete some files from your real device and it will work.

Related

running flutter in vs code shows Running with sound null safety

This is my first app in flutter using VS Code.
While I try to run my program via terminal using command flutter run shows:
Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with"--enable-software-rendering".
Launching lib\main.dart on Android SDK built for x86 in debug mode...
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/addon2/03 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/repository2/03 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/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/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
Running Gradle task 'assembleDebug'... 12.3s
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Syncing files to device Android SDK built for x86... 9.4s
Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
Running with sound null safety
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:63186/_rjqXM3bogc=/
The Flutter DevTools debugger and profiler on Android SDK built for x86 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:63186/_rjqXM3bogc=/
After this nothing happens in terminal neither virtual device opens up. What is happening?
When running flutter doctor shows everything ok.
This error happens because of gradle version this is an error like this question just update your gradle in Your_Flutter_App > android > build.gradle, dependencies block to new versions like:
classpath 'com.android.tools.build:gradle:7.0.2'
check buildToolsVersion and compileSdkVersion in /android/app/build.gradle if didnt work.

ld: Invalid value (Producer: 'LLVM13.0.0-rust-1.57.0-nightly' Reader: 'LLVM APPLE_1_1300.0.29.3_0') for architecture arm64

Trying to install and work with zkgroup.
Build, run for specific iOS device working fine.
But generic archiving is not working.
Error text:
ld: Invalid value (Producer: 'LLVM13.0.0-rust-1.57.0-nightly' Reader: 'LLVM APPLE_1_1300.0.29.3_0') for architecture arm64
Rust toolchain:
installed toolchains
--------------------
stable-x86_64-apple-darwin
nightly-2021-06-08-x86_64-apple-darwin
nightly-2021-09-16-x86_64-apple-darwin (default)
nightly-2021-09-19-x86_64-apple-darwin
installed targets for active toolchain
--------------------------------------
aarch64-apple-ios
aarch64-apple-ios-sim
x86_64-apple-darwin
x86_64-apple-ios
active toolchain
----------------
nightly-2021-09-16-x86_64-apple-darwin (default)
rustc 1.57.0-nightly (2c7bc5e33 2021-09-15)
Any insight?
The solution to this problem turns out to be deceptively simple: set the Xcode build setting "Enable Bitcode" to "No", as in this image:
(I figured this out by first discovering that command-line archive builds did not have this problem, and then comparing their log with the in-Xcode build log. The in-XCode build was doing bitcode-verify operations, which reminded me that the Rust cargo-lipo README talks about turning this setting off to avoid this LLVM incompatibility.)
I was fighting with this error while using the isar package in Flutter. The problem was with isar_flutter_libs 2.5.0.
Solution
Delete pubspec.lock and podfile.lock
Downgrade all isar libs to 2.4.0
In the terminal, run dart pub remove isar_flutter_libs
flutter pub get
pod update

Warning: Mapping new ns to old ns and emulator stopping abruptly

After upgrading to Arctic Fox , I am getting the following errors, even though the emulator is running but sometimes stopping abruptly.
What is this error ?
How can I get rid of this ?
I am using the following as copied from cmd :
> C:\Users\Debasis>flutter doctor Doctor summary (to see all details,
> run flutter doctor -v): [√] Flutter (Channel stable, 2.2.3, on
> Microsoft Windows [Version 10.0.19042.1165], locale en-IN) [√] Android
> toolchain - develop for Android devices (Android SDK version 31.0.0)
> [√] Chrome - develop for the web [√] Android Studio [√] Connected
> device (2 available)
• No issues found!
The Error :
Launching lib\main.dart on sdk gphone x86 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 √
Built build\app\outputs\flutter-apk\app-debug.apk. Installing
build\app\outputs\flutter-apk\app.apk... Debug service listening on
ws://127.0.0.1:57467/XzCZTOeqyQs=/ws Syncing files to device sdk
gphone x86...
I had a similar issue. Two things did the trick for me.
Updated the gradle version in my gradle-wrapper.properties file to the latest available version
Updated the gradle plugin version in my /android/build.gradle file to the latest available version
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
/android/build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
}
Give these a try and see if it works!
I have also the same problem, when I was updated android studio. i research to fix that issue,
TODO ;
step 1 : GOTO project Folder
/android/build.gradle
to update a latest gradle version in dependencies.
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
}
step 2 :
/android/gradle/wrapper/gradle-wrapper.properties
here also to update a latest version of gradle
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
step 3: go to terminal and run flutter clean
step 4: and run flutter pub get
step 5: and run your project using flutter run command
one more think but that issue fix that project only. if u know fix that issue permanently please let me know,
I got the same problem, but after quick research, I managed to solve the problem.
step 1: Go to this webpage: Android Gradle plugin
step 2: Copy the build.gradle plugin to version
step 3: Go to your flutter app project and open the "build.gradle" file under
your_project>android
step 4: In that file edit dependencies.
classpath 'com.android.tools.build:gradle:<step 2 copied version>'
step 5: Now re-run your flutter app. You might see a new error, showing
A problem occurred evaluating project ':app'.
Failed to apply plugin 'com.android.internal.version-check'.
Now follow the instructions given in that error. (highlighted area in the image)

When I run flutter app shows Warning: Mapping new ns http://schemas.android.co

this pop ups when I run flutter app, I already installed all version of build tool of 30
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
I deleted platforms in android sdk and reinstall and it works fine now!

Can't run flutter project due to error VERBOSE.dart error, isolate error

When I try to run my flutter-project code on the iOS simulator in VS code, I get the following error on the console:
Launching lib/main.dart on iPhone 11 Pro in debug mode...
lib/main.dart:1
Xcode build done. 24.4s
[VERBOSE-2:shell.cc(103)] Dart Error: Can't load Kernel binary: Invalid SDK hash.
[VERBOSE-2:dart_isolate.cc(171)] Could not prepare isolate.
[VERBOSE-2:runtime_controller.cc(415)] Could not create root isolate.
[VERBOSE-2:shell.cc(588)] Could not launch engine with configuration.
Thanks in advance.
Hi!
In my case, the error was caused by the forced shutdown of the IDE.
After manually selecting the libraries, I identified the one that was causing the problem, updated the project without it, and updated the project again with it.
With that the problem was solved.
Hope I have helped, if yes, please flag.
Could you delete the bin/cache folder, then run app
Open terminal and run: $ flutter channel beta
"it will install beta version, once installation is done, try it!"
"In case you willing to change the beta version to stable version you can use the following:"
$ flutter channel stable