I've started the android emulator (android 5.1), wanted to install an apk through drag and drop, but I get this error message:
pm install-create -r -t --user current --full -S 203239352' returns error 'Unknown failure: Error: java.lang.NumberFormatException: Invalid int: "current"'
I've tried on an m1 mac and a windows pc. On the mac I tried arm and arm64, on windows tried it with x86. Got apk files with matching architectures for all of them with chrome version (95.0.4638.x) compatible with android 5.1. I get the same error message for all of them.
Related
After adding the syncfusion_flutter_datagrid, printing and pdf packages, When building for web I get the following error:
I have run flutter clean && flutter pub get but it didn't help. I also tried adding ffi to pubspec.yml.
Compiling lib/main.dart for the Web... 16.0s
Target dart2js failed: Exception: Warning: The 'dart2js' entrypoint script is deprecated, please use 'dart compile js' instead.
/root/.pub-cache/hosted/pub.dartlang.org/archive-3.3.3/lib/src/util/aes_decrypt.dart:1:8:
Error: Not found: 'dart:ffi'
import 'dart:ffi';
^
/root/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_datagrid-20.3.56/lib/src/datagrid_widget/widgets/cell_widget.dart:695:19:
Warning: Operand of null-aware operation '!' has type 'OverlayState' which excludes null.
- 'OverlayState' is from 'package:flutter/src/widgets/overlay.dart' ('/usr/local/flutter/packages/flutter/lib/src/widgets/overlay.dart').
Overlay.of(context)!.context.findRenderObject()! as RenderBox;
^
Error: Compilation failed.
Exception: Failed to compile application for the Web.
The command '/bin/sh -c flutter build web' returned a non-zero code: 1
mark#mark-desktop:~/dev/example/cmd/client$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.7, on Ubuntu 22.04.1 LTS 5.15.0-52-generic, locale en_AU.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.3)
[✓] VS Code
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!
edit: I remove the syncfusion_data_grid but continue to get the same error.
Well.. it's pretty hard to pin-point the exact reason without the specific version for each package used in your project. HOWEVER, it seems like a common issue that occurs whenever a sub-dependency is configures to an old version that causes trouble.
Following this great post it seems that you need to upgrade your packages to avoid this error. Please follow these steps:
run flutter pub upgrade
if the error is not resolved - run flutter pub upgrade --major-versions
if not resolved yet - remove all dependencies (plus - comment all related code) and verify that the project compiles successfully
Needles to say that you should verify that you have proper access to your file system in order to avoid read / write issues due to insufficient permissions
I installed Qt 6.3 ,Android Studio 7 (Chipmunk 2021.2.1),java jdk-11.0.15+10 NDK Version: 22.1.7171670).The Android build Platform Sdk 32.
The jdk does not have jre.
A screenshot is attached.
I am using gradle 5.6.4
When I deploy to Android it fails with the following error log (compile output).
"
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\o\Documents\build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug\android-build\build.gradle' line: 17
What went wrong:
A problem occurred evaluating root project 'android-build'.
Failed to apply plugin [id 'com.android.internal.version-check']
Minimum supported Gradle version is 7.0.2. Current version is 5.6.4. If using the gradle wrapper, try editing the distributionUrl in C:\Users\o\Documents\build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug\android-build\gradle\wrapper\gradle-wrapper.properties to gradle-7.0.2-all.zip
Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 4m 17s
Building the android package failed!
18:55:35: The process "C:\Qt\6.3.0\mingw_64\bin\androiddeployqt.exe" exited with code 14.
Error while building/deploying project TrackGate (kit: Android Qt 6.3.0 Clang armeabi-v7a)
When executing step "Build Android APK"
18:55:36: Elapsed time: 06:45. "
when i change to gradle7.0.2 i get
"adb.exe: device 'DVKS100I21060300956' not found
...
Installing to device failed!
19:11:44: The process "C:\Qt\6.3.0\mingw_64\bin\androiddeployqt.exe" exited with code 16.
19:11:44: Installing the app failed with an unknown error.
...
19:11:44: The command "C:\Users\o\AppData\Local\Android\Sdk\platform-tools\adb.exe -s DVKS100I21060300956 pull /system/bin/app_process C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/app_process" terminated with exit code 1.
19:11:44: Package deploy: Failed to pull "/system/bin/app_process" to "C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/app_process
...
19:11:44: The command "C:\Users\o\AppData\Local\Android\Sdk\platform-tools\adb.exe -s DVKS100I21060300956 pull /system/bin/app_process32 C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/app_process" terminated with exit code 1.
19:11:44: Package deploy: Failed to pull "/system/bin/app_process32" to "C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/app_process".
...
19:11:44: The command "C:\Users\o\AppData\Local\Android\Sdk\platform-tools\adb.exe -s DVKS100I21060300956 pull /system/bin/linker C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/linker" terminated with exit code 1.
19:11:44: Package deploy: Failed to pull "/system/bin/linker" to "C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/linker".
...
19:11:44: The command "C:\Users\o\AppData\Local\Android\Sdk\platform-tools\adb.exe -s DVKS100I21060300956 pull /system/lib/libc.so C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/libc.so" terminated with exit code 1.
...
19:11:44: Package deploy: Failed to pull "/system/lib/libc.so" to "C:/Users/o/Documents/build-TrackGate-Android_Qt_6_3_0_Clang_armeabi_v7a-Debug/libc.so".
Error while building/deploying project TrackGate (kit: Android Qt 6.3.0 Clang armeabi-v7a)
When executing step "Deploy to Android device"
"
Assist in setting-up the environment because an android device is connected via usb.
I finally got it to deploy to device by uninstalling everything related to Qt, Java and and Android Studio. I reinstalled Qt 6.3.1 and used Qt to install Java and Android Studio .I made sure that the Arm64 v8 system image for API 30 is available in Android Studio.
This video link "https://www.youtube.com/watch?v=XrQ_j6VOnzo" helps with Qt 6 installation .
This video link "https://www.youtube.com/watch?v=WafdjRhyDRc" helps with Android Studio installation
Yesterday I updated my Mac with Android Studio Bumblebee 2021.1.1 hoping that it would solve multiplatform issues I encounter.
Below some screenshots about my Mac and versions to be 100% clear:
Android Studio Bumblee About
macOs Monterey 12.2 iMac details
xCode 13.2.1 versions
Kotlin Multiplaform Mobile version
When I create a new KMM Application project I get errors. These are the steps (I can't post all screenshots): Basically accepting all default settings and followed by the final step:
New Project Step 3
After clicking finish on the New Project dialog Android Studio instantly shows an error in the bottom right corner: "Project wasn't configured"
Project wasn't configure error
After that I see these errors (text is below):
Android Studio build window output
'pod install' command failed with an exception: Cannot run program "pod" (in directory "/Users/johndoe/AndroidStudioProjects/MyApplication/iosApp"): error=2, No such file or directory
Possible reason: CocoaPods is not installed
Please check that CocoaPods v1.10 or above and cocoapods-generate plugin are installed.
To check CocoaPods version type 'pod --version' in the terminal
To install CocoaPods execute 'sudo gem install cocoapods'
To install cocoapod-generate execute 'sudo gem install cocoapods-generate'
The CocoaPods and cocoapod-generate are installed. When in the terminal window I can execute some commands succesfully (eg. pod --version (version 1.11.2) and pod install)
Android Studio Terminal output
Just to be clear: the directory and file it complains about do exist. I can navigate to it and run a succesful pod install and pod update command.
Is this a new bug and I'm just an early adaptor or is there a misconfiguration on my Mac? On my actual project I have the same error that compiled with the previous Android Studio version without any problems. I did have other challenges (see my different unanswered question).
There is an Android Studio bug report for this, including a workaround: https://issuetracker.google.com/issues/216364005#comment7
The root cause appear to be missing executable flag on Contents/bin/printenv file.
The workaround is to add missing flag: chmod +x /Applications/Android\ Studio.app/Contents/bin/printenv
If the above answer doesn't work for you, try checking $SHELL value in your IDE and in the terminal that you use. In my case they were different:
Android studio used zsh, which was unable to run pod command.
I personally use bash in the terminal. And I was able to run pod from it manually.
The solution was to switch to zsh and make pod work there by installing it with sudo gem install cocoapods.
I just updated my android SDK tools to 26.1.1 as it was showing "Updates available", after that my AVD couldn't start, it gave following HAXM related error, although the HAXM was already installed and was working fine before the SDK tools update.
So I uninstalled the HAXM and tried to install it again, but the installation failed giving the following error :
Then I installed the HAXM separately, after downloading the latest ver from git repo (https://github.com/intel/haxm/releases/tag/v7.5.4)
It got installed properly, but still the AVD is failing with same error.
Following the current state of my SDK Tools :
I am working on Win 10 Pro, x86_64, 4GB RAM, Core i7-3517U
Problem solved, you need to go to SDK manager and update Android Emulator to version 29.3.2
then try to install en SDK manager Intel x86 Emulator Accelerator (HAXM installer)
and thats it.
all working fine again.
Android emulator
I have Arch Linux installed on my laptop, I installed Android studio too.
From this system I can almost develop anything I want
But I cannot boot android emulator either hardware accelerate or not.
When I get the emulator updated to the latest, it keep showing me the following message
Emulator: KVM: injection failed, MSI lost (Operation not permitted)
and I have no idea what's it talking about.
Please install qemu if not install
sudo packman -S qemu
sudo adduser $USER kvm
Then close the android studio and logout and log back in.
After that open the android studio and open the emulator.
Reference: https://stackoverflow.com/a/45749003/7356355