Flutter build apk and installed got flash blank screen - android

when I build the flutter app and install on the real android phone I got these errors.
Launching lib/src/config/flavors/main_stage.dart on DUB AL00 in debug mode...
✓ Built build/app/outputs/apk/debug/app-debug.apk.
E/flutter (32542): [ERROR:flutter/shell/gpu/gpu_surface_gl.cc(70)] Failed to setup Skia Gr context.
Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:52745/fiENvL9drJE=/ws
Exited (sigterm)
I googled there are saying add --enable-software-rendering , this works with debug mode
but how can I make work when I build an installable APK? If I run as relase mode this argument does not work.
anyone can help? thanks

flutter run --enable-software-rendering should work as a work-around. CC #mit-mit, #cbracken #chinmaygarde I thought that we had decided to make Android Emulators default to software rendering? (I can't seem to find the issue tracking that)?
source

Run > Edit Config > Additional Argument > "--enable-software-rendering"

Related

Waiting for another flutter command to release the startup lock ; Got socket error trying to find package english_words at https://pub.dartlang.org

I have trying to install flutter onto my Mac.I have realised that I might have installed flutter multiple time without uninstalling properly. Now suggest me the needful to get why flutter fired up and running.
For this error:
Waiting for another flutter command to release the startup lock
I tried running killall -9 dart and removing /bin/cache/lockfile (there was no lock file)
Waiting for another flutter command to release the startup lock
For this error:
Got socket error trying to find package english_words at https://pub.dartlang.org
I tired changing to auto-detect proxy in android studio
Got socket error trying to find package english_words at https://pub.dartlang.org
Ps: I followed the flutter docs from the website and not sure what I might have done wrong.
So I found out the answer myself. Just posting the answer so that someone else could benefit.
It was the antivirus in my case. it was not allowing to find the package in https://pub.dartlang.org.
I turned off the antivirus, now I the flutter runs fine.

INSTALL_PARSE_FAILED_NO_CERTIFICATES on a debug build when using 'Run' button

So I was just making a toy app to test capturing photos and video for an app at work. I set up everything in a standard fashion, make a small activity and when I try to use the 'Run' command in android studio to install on my device, I get the following error:
11/28 11:14:32: Launching 'app' on Unknown Device.
Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_NO_CERTIFICATES
APK signature verification failed.
Retry
I tried searching google as to why this might happen, but I only found things concerning the generation of a signed apk and usually in a release build. I have done no signing configs on this project. It's basically a standard Android Studio generated project. Here's a screenshot of my gradle file:
module-gradle-file
Has anyone encountered this problem? I'm using Android Studio 3.5, gradle 5.4.1 and gradle plugin 3.5.0
UPDATE
So, I decided to just restart the adb server and it worked. The question of why this happened, though, remains

Ionic 4 - install run performed a full build and install since the installation on device does not match the local build on disk

Im trying to generate an APK to test my android build, it used to work before, i dont know what went wrong that it stopped working, whenever i try to run on device either on android studio or my own device, it does not build even though its error clean. App actually installs, but when its about to run it closes down and this message appears
Heres what i got from checking the logcat on Android Studio: https://imgur.com/a/FdE4WMo
Try uninstalling the app from the device and then run it again.
The dev / debug build uses an encryption key that's specific to the machine so I think that maybe you are trying to install a different app over the original one?

Debugging Android apps via IntelliJ/Android SDK on my Samsung Galaxy S10+ results in "Error while Installing APKs"

I decided to generate even more money and develop my first app for Android. When I want to deploy my app (just the skeleton code from IntelliJ/Android SDK) with one MainActivity I am getting the following error.
The log of the run looks like this.
5/07 21:32:35: Launching app
$ adb install-multiple -r -t
C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_7.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_6.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_8.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_9.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_4.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_5.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_3.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\resources\instant-run\debug\resources-debug.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_0.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_1.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\dep\dependencies.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_2.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\instant-run-apk\debug\app-debug.apk
$ adb shell pm uninstall com.stark.purewallpaper
Unknown failure: Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: com.stark.purewallpaper
at com.android.server.pm.Settings.getInstallerPackageNameLPr(Settings.java:4671)
at com.android.server.pm.PackageManagerService.getInstallerPackageName(PackageManagerService.java:25342)
at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:25348)
at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:21062)
at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:924)
at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:1486)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:193)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:25884)
at android.os.Binder.shellCommand(Binder.java:642)
at android.os.Binder.onTransact(Binder.java:540)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:3329)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4763)
at android.os.Binder.execTransact(Binder.java:739)
Error while Installing APKs
The event log looks like this.
21:32 Executing tasks: [:app:assembleDebug]
21:32 Gradle build finished in 493 ms
21:32 Failed to finalize session : -118
Things I tried on the phone:
re-enabled dev mode
re-enabled USB debugging
tried different default usb configurations like "picture" or "file" transfer
tried activating "wait for debugger" option
Things I tried in IntelliJ:
deactivated "Instant Run"
installed all SDK tools, including the "Google USB Driver"
cleaned and rebuild the project
IntelliJ can clearly see my device, it even detects the type correctly.
I am on:
Windows 10
IntelliJ 2019.1.1
Newest Android SDK that comes with IntelliJ
I decided to try this on Android Studio 3.4 and I'm getting same error.
I am able to run the app inside the emulator/virtual device but not on my Samsung Galaxy S10+. Any ideas?
If none of the solution mentioned above works, you can turn off the instant run option as shown in the from setting
Try this:
Build > Clean Project
Build > Rebuild Project
Build > Make Project (Ctrl + F9)
Try to use this File > Invalidates cache/restart
Lastly, try to sync project with Gradle file which can be found in the right corner top
I finally, after days, found out what it was. My company forced a security policy on my phone after I configured the e-mail app to receive work mail. After deactivating the policy in security settings I was able to deploy the app without any problems.
Go to your Apps menu from your Android device Settings.
Find your app, probably name is PureWallpaper according to your logs.
Uninstall it.
Then try to install it again.
Explanation:
According to your error logs, it looks like your device has the same app installed but with different signature signed with different keystore.
This was happen to me many times ,
This is just a warning ,It try to say that the app you want to install on your device is already installed on your device ,but the problem is it is signed with different credentials .
For eg:-
their was a release apk of the same app installed on your device and you are trying to install debug apk on same device.
This error also try to say that the that all the data which are saved by that apk will be lost.
Side note:- after clicking OK,sometimes android studio gives me error that it is unable to install but actually it installed.

when i use "tns preview" to start an android emulator i get an error code

i want to preview my nativescript code on an android emulator which as i use the command line which is, i navigated to my app folder which which was successfully but when i type "tns preview" to run an android emulator to see my code in action i get
Found peer TypeScript 3.1.6
#
# Fatal
process OOM in insufficient memory to create an Isolate
#
TypeScript compiler failed with exit code 3221225477
and an android emulator is connected successfully, even nativescript notice the emulator, please what do i do
i have tried the Nativescript sidekick to start the emulator but the nativescript sees the android emulator and it did not report an error indication but when i select the android emulator and click "Run on Device" i get
Build failed. TypeScript compiler failed with exit code 3221225477
even i have tried using my android device for previewing it which i install the nativescript playground & nativescript preview but if i scan the QR Code it is not previewing, please help out
please i need a solution
Preview is to be used with real device for quick testing. The basic idea is to avoid setting up whole iOS / Android SDKs on your local machine.
Produces a QR code which can be used to preview the app on a device without the need to install various SDKs and tools or configure your environment for local iOS or Android development.
To scan the QR code and deploy your app on a device, you need to have
the NativeScript Playground app:
App Store (iOS):
https://itunes.apple.com/us/app/nativescript-playground/id1263543946?mt=8&ls=1
Google Play (Android):
https://play.google.com/store/apps/details?id=org.nativescript.play
If you want to view your app on your android emulator, run the command
'tns run android --emulator'
This is assuming you already have an emulator set up on your machine.
To see a list of your available devices run the command
'tns device'
If you have not set up an emulator follow setup here: https://docs.nativescript.org/tooling/android-virtual-devices

Categories

Resources