I am trying to work trough wifi adb. So i connected my device with wifi and the regular ionic build works fine.
But when i trying to build with live reload -> ionic cordova run android -l
I got error:
[native-run] Error: Command failed: C:\Users\###\AppData\Local\Android\Sdk\platform-tools\adb -s 192.###.###.###:5555 reverse tcp:8101 tcp:8101
[native-run] adb.exe: error: more than one device/emulator
[native-run]
[native-run] at ChildProcess.exithandler (child_process.js:294:12)
[native-run] at ChildProcess.emit (events.js:198:13)
[native-run] at maybeClose (internal/child_process.js:982:16)
[native-run] at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
Whats wrong?
Found solution here: https://github.com/ionic-team/native-run/issues/28
ionic cordova run android --host=0.0.0.0 --public-host= --port 8100 --livereload --no-native-run
Related
Full disclosure total dart / flutter noob.
Trying to build the example app for macOS desktop. Using Android Studio, intel mac, macOS Monterey. Building for iOS or chrome works fine. When building for macOS I just get the following error:
Launching lib/main.dart on macOS in debug mode...
Building macOS application...
Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **
Exception: Build process failed
Not much to go on with that error...
Thanks for any help
Could Not Find C:\Users\Mohammed\AppData\Local\Android\sdk\platform-tools\AdbWinApi.dll.dat
The directory name is invalid.
W/FlutterActivityAndFragmentDelegate( 9139): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Error waiting for a debug connection: ProcessException: adb returned error:
The directory name is invalid.
Could Not Find C:\Users\Mohammed\AppData\Local\Android\sdk\platform-tools\AdbWinApi.dll.dat
Command: C:\Users\Mohammed\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:42601
Error launching application on Android SDK built for x86.
Exited (sigterm)
I solved this issue by the following 3 steps:
1 remove the sdk and emulator.
2 install again the sdk and emulator.
3 restart my computer
and then then solved it
ADB will not install my 32-bit APK file on an emulator. But it is not showing any error message when trying to install it:
In Android Studio 4.2.2 (on my Ubuntu 20.04.2 LTS laptop) I installed an emulator: Pixel_2_API_27_Android_8.1_x86_
I then open a Terminal window and do this:
:~$ /home/henrik/Android/Sdk/platform-tools/adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
:~$ which adb
:~$ /home/henrik/Android/Sdk/platform-tools/adb devices -l
List of devices attached
:~$ emulator #Pixel_2_API_27_Android_8.1_x86_
emulator: Android emulator version 30.7.4.0 (build_id 7453540) (CL:N/A)
handleCpuAcceleration: feature check for hvf
cannot add library /home/henrik/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
added library /home/henrik/Android/Sdk/emulator/lib64/vulkan/libvulkan.so
cannot add library /home/henrik/Android/Sdk/emulator/lib64/vulkan/libvulkan.so.1: full
emulator: INFO: GrpcServices.cpp:315: Started GRPC server at 127.0.0.1:8554, security: Local
emulator: INFO: EmulatorAdvertisement.cpp:93: Advertising in: /run/user/1000/avd/running/pid_68812.ini
qemu-system-i386: warning: TSC frequency mismatch between VM (2711993 kHz) and host (2711986 kHz), and TSC scaling unavailable
In a new Terminal tab I do this:
:~$ /home/henrik/Android/Sdk/platform-tools/adb devices -l
List of devices attached
emulator-5554 device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:1
:~$ /home/henrik/Android/Sdk/platform-tools/adb -s emulator-5554 install /mnt/4AF15A0435E762B4/mypython/storage/bin/storage-0.1-armeabi-v7a-debug.apk
Performing Streamed Install
But then, nothing happens. (I waited a very long time.)
If I copy the APK file to my physical MOTO G5 Android 8.1.0 phone and install it, at least I get en error message showing that it DID install.
I have problem when i bulid ios using ionic cordova build ios --release
how can i solve it , i am using macOS
Apple-User:alfraseh FirasHunaiti$ ionic cordova build ios --release
> ionic-app-scripts build --target cordova --platform ios
Error: spawn EACCES
at ChildProcess.spawn (internal/child_process.js:313:11)
at Object.exports.spawn (child_process.js:503:9)
at spawn
(/usr/local/lib/node_modules/ionic/node_modules/cross-spawn/index.js:17:18)
at spawn
(/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-framework/utils/shell.js:124:12)
at ShellCommand.spawn
(/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-framework/utils/shell.js:113:16)
at ShellCommand.run
(/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-framework/utils/shell.js:80:24)
at Shell.<anonymous>
(/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/shell.js:32:37)
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:107:75
at new Promise (<anonymous>)
Build the project for ios (Xcode) sudo ionic cordova prepare iOS or sudo ionic Cordova build ios then go to the platform folder in the project and open with xcode the one that I export to you, and from xcode compile the project.
I have walked through the tutorial instructions to set up cordova and ionic. I can successfully run the app in development but get this error when building ios. Any ideas? Tried updating node and cordova.
sudo ionic build ios
Running 'build:before' gulp task before build
[11:16:00] Starting 'clean'...
[11:16:00] Finished 'clean' after 47 ms
[11:16:00] Starting 'build'...
[11:16:00] Starting 'sass'...
[11:16:00] Starting 'html'...
[11:16:00] Starting 'fonts'...
[11:16:00] Starting 'scripts'...
[11:16:00] Finished 'scripts' after 45 ms
[11:16:00] Finished 'html' after 51 ms
[11:16:00] Finished 'fonts' after 54 ms
[11:16:00] Finished 'sass' after 770 ms
[11:16:07] Finished 'build' after 7.18 s
[11:16:07] Starting 'build:before'...
[11:16:07] Finished 'build:before' after 11 μs
• You're trying to build for ios but don't have the platform installed yet.
∆ Installing ios for you.
Installing cordova-plugin-device
Installing cordova-plugin-console
Installing cordova-plugin-whitelist
Installing cordova-plugin-splashscreen
Installing cordova-plugin-statusbar
Installing ionic-plugin-keyboard
Error: Command failed: /bin/sh -c cordova platform add ios
Error: Platform ios already added.
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:821:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:4
69:12)
First of all, it seems you have some issues on ios platform installation, try removing it and adding it back to your development space.
Run command ionic platform remove ios && ionic platform add ios before trying to build for ios.
Second, you need Mac Operating system to build ios apps, as it has dependencies on XCode (A native software) to build.
Third, if you still have the same iussue, then it could be due to a bug discribed here. https://github.com/driftyco/ionic-cli/issues/772
Try sudo npm install -g cordova and rerun the build.
Good luck.