Gradle Android-Studio: deploy / run on multiple devices parallel - deployment

I came from Intellij (and ANT) and there I can run an apk if more than one devices are connected. Then I get a chooser dialog with all connected devices(offline and online).
Now I work with Android-Studio and gradle and if I deploy with run or whatever (installDebug, clean etc.), it deploys automatically on the device (and AFTER deploying on device i get the chooser dialog). If I connected more than one device, than he faild the build with the message "more than one device".
Its possible with configuration in Android-studio, compile or gradle task or in build.gradle to get again the chooser dialog with all connected devices again? I loved the intellij Feature for deploying one apk on multiple devices parallel.
Thanks

In the "Choose Device" dialog that comes up to let you choose a physical device or emulator instance to run your app on, you can choose multiple items from the list:
If you're not seeing this dialog, it's possible you clicked the "Use same device for future launches" button in the dialog. Go into the run configuration and reset the settings under "Target Device".

Check that your android devices have a different serial number.
Use
adb devices
to list serial number of connected devices.
Since they(IDEs) all use adb under the hood, I think the message "more than one device" is thrown from adb when it failed to uniquely identify devices.

In my deploy prozess i used the gradle statements gradle run, install or clean. This are Tasks, there deploy automatically. i use now assemble gradle task and now it works, sorry for confusing

Related

Differentiate between ADB Device connected over USB and Wi-Fi

I have started flutter development. I am using VSCode for this. When I want to run my app, I have to select the device I want to test it on by clicking the option on the status bar at the left.
In there, I get 2 options, one for my phone with ADB over USB, and other for my phone(same as before) with ADB over Wifi.
I cannot determine which is which because both have the same name.
Is there a way for me to change the name of one of them?
Try restarting your Visual Studio code and reconnect your device. There shouldn't be duplicate names.
Try using Android Studio, you will see two different names of the same devices.
Update:
the other solution is built the app by using the command line
flutter run
then you will see two options, one is SM G885F(xxx) which is connected by USB,
the other one is SM G885F(192.168.x.xxx) which is connected with Wifi
You will also see this line if you upgrade the latest flutter version
Please choose one: [0|1]:
Just type 0 or 1 then enter you can build a debug version.
Build release by entering
flutter run --release

First Flutter App stuck at “Running Gradle task 'assembleDebug'… ” in Llnux Mint

I'm getting the following error while running my first flutter app in the terminal
Launching lib/main.dart on vivo 1802 in debug mode...
Running Gradle task 'assembleDebug'...
(This is taking an unexpectedly long time.)
I already tried downloading the gradle distribution separately and copy pasting it in my project's gradle wrapper and restarting android studio but it still doesn't resolve the issue.
I'm using Linux Mint 19.
Make sure you have an internet connection.When running an app for the first time, gradle needs to download some additional content
Check your connection to your virtual phone or your phone well. Make sure it doesn't disconnect while you are running the app
Before starting this building process, make sure:
USB debugging is enabled on your phone,
No app is currently running (and you are on your home screen),
While running your app for the first time on a phone, your phone will get a pop-up asking you to allow the installation of apps via USB.
Click 'allow' on it.
Not clicking 'allow' or simply ignoring it will make it seem like the build process is never-ending.

Freeze on Copying APK file

I created a new empty project, switched platform to Android and started Build and Run. But when it comes to "Copying APK File to device" it just freezes and I have to restart Unity.
I installed Android SDK & NDK tools just before that (through Unity Hub). Android Build Support was installed by me manually a while ago so it was visible as installed in Add Modules window. I did not do any changes to the project. The most interesting thing is that the apk is built in my Builds folder. Not sure if it works though.
I am using Unity 2019.1.0f2. The device Android version is 9.0 (API level 28) and the minimum API set in Player is 16, so the problem should not be with API.
Does anyone know possible reasons for it?
Try to turn off the following setting on your android device.
Settings -> Developer options -> Monitor apps installed by ADB
This setting(if turned on) will ask a verrification if you want to install the app. It feels like this cuts off the connection with unity which causes it to get stuck.
Unplugging and replugging the device seems to work aswell. In case of big projects this is anoying tho since if you are to quick it will just say it lost connection and it will ask if you want to reconnect, which in turn causes the same problem.
This is the only answer that worked for me:
https://answers.unity.com/questions/1248123/build-run-apk-freezes-on-pushing-content-only-one.html
In short, Player settings -> Publishing settings -> Split application binary
First of I would ask you on what computer did you run this on? (performance wise)
Second you can just copy the .apk file to the phone and install it there. If you got to where it prompts for copying to android your apk file is fine and built.

"Installation or uninstallation is not working temporarily" error when trying to launch Tizen watch application from Tizen SDK

When trying to launch the native watch application from Tizen IDE, I see the strange message "Certain application categories, such as "Watch Application", cannot be launched by "Run As".
Indeed, I try to use Run As from the project local menu to launch my app. But how else I am supposed to launch my application on the emulator?
The emulator device (watch) is up and running, visible on desktop as a separate widget. It is selected. The signing configuration is set up.
On the console output I see the message processing result : FATAL_ERROR [61].
I also tried to launch through the created launch configuration but this results the same error message.
The IDE logs show the following stack trace:
[2015.09.06 12:16:48][ERROR] ConnectionExplorer.java(658) - Fail to get platform log
[2015.09.06 12:18:59][ERROR] RdsDeployer.java(269) - Cannot partially upload or reinstall
org.eclipse.core.runtime.CoreException: [RDS] Cannot install application
at org.tizen.common.rds.RdsDeployer.newCoreException(RdsDeployer.java:699)
at org.tizen.common.rds.RdsDeployer.postInstall(RdsDeployer.java:634)
at org.tizen.common.rds.RdsDeployer.partialZipInstall(RdsDeployer.java:566)
at org.tizen.common.rds.RdsDeployer.deploy(RdsDeployer.java:267)
at org.tizen.nativecommon.launch.TizenLaunchDelegate2.deployApplication(TizenLaunchDelegate2.java:783)
at org.tizen.nativecommon.launch.TizenLaunchDelegate2.launchApplicationForRun(TizenLaunchDelegate2.java:504)
at org.tizen.nativecommon.launch.TizenLaunchDelegate2.launch(TizenLaunchDelegate2.java:216)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.tizen.common.sdb.command.message.CommandErrorException:
Error code: FATAL_ERROR
Error message:
Command: /usr/bin/pkgcmd -q -r -t tpk -n com.au.heywatch
Management: Installation or uninstallation is not working temporarily.
P.S. I add "eclipse" tag because Tizen SDK is very clearly Eclipse based IDE. Using Tizen IDE 2.3.1.
Watch face applications(Web/native) are never installed as widgets. You cannot see them in app menu.
Reason:
Within your tizen-manifest.xml file in your project, you'll find below line there
<watch-application appid="org.tizen.watchsample" exec="watchsample" ambient-support="true">
which makes your app as watch application and these apps are known as watch faces because they will be used in setting as the main watch in gear.
And on emulator, you cannot change the watch face on the home screen. Hence, you won't be able to test your watch application that way.
Had the same issue. My problem was certificate setup.
i followed there instructions: http://127.0.0.1:50224/help/topic/org.tizen.addon.certificate/html/dev_env/setting_author_certificate.htm
(link is from help and should work in browser when Tizen IDE is up, alternately you can go to Tizen IDE -> Help -> Help Content and search Certificate.
More specific: Distributor certificate i had was wrong (use the pass received by Samsung by email)
After fixing certificate, don't forget to right click your device in Connection Explorer and click Permit to install applications.

Cannot starting android emulator

I am studying about phonegap. I run Android Virtual Device Manager, selected a device and click started. After starting android emulator finished loading.
I saw emulator-arm.exe in the task manager and it took some memory resource. But no emulator appeared. After about 10 seconds, emulator-arm.exe disappeared from task manager.
I couldn't start Android Emulator. Please help me! Thank you!
Did you use the latest version of the platform-tools and the image? Run "android" script in your android-sdk/tools folder, and update all items related with emulators. Then, run "AVD Manager" in the root folder of the SDK. Then, create a virtual machine based on a real device of your choice. Then, run and wait, emulator takes some time to appear.
Other better choice would be use Genymotion emulator, which has more speed and stability. Good luck!