updated android-studio to 3.1.3;how to run application on phone in new version;Please select android sdk - android-studio

under general tab there is module.which is selected to app.under Installation options there is Deploy which is selected to default APK. There is Install flags which is empty. there is Launch options. Under that Launch is selected to default activity.Then there is Launch flags which is empty.Then there is deployment target options which is selected to Target:USB device.
How do I run my app on mobile phone
earlier the phone icon was displayed on studio and I had to click the icon. Now in 3.1.3 it is different

Make sure your android phone is connected to the laptop using USB Cable.
Also, make sure usb debugging is on.
Then, when you run the app module, it will run the adb and show you the list of virtual devices you created and the usb connected mobile phone.
Select the mobile phone from the list of options and press ok.
Gradle build will run and then it will install the apk on that connected mobile phone.
If it doesnt install, check the errors under the run console.

I clicked sync gradle button, it did some downloads. Now it is ok

Related

How do I deploy apps to an Android phone using Android Studio on a Chromebook?

I'm using Android Studio on a Dell Chromebook. I've confirmed that the adb daemon is running, but when I plug in my Android phone (Samsung Galaxy S10e) it is not recognized by adb. Instead, I get a Chrome OS notification saying "USB device detected" and giving me the option to "Connect to Linux" but when I click that button nothing happens. On my phone I get a dialog saying "Allow access to your data" but when I click allow it just opens a file browser on the Chromebook.
When I plug this same phone into my Windows laptop and iMac, I get a different dialog on my phone saying "Allow USB debugging" and then I am able to run apps from Android Studio on the device. So it seems like the problem is with my Chromebook, but I can't find any documentation for my problem. According to this page there should be no additional configuration required on Chrome OS:
https://developer.android.com/studio/run/device?utm_source=android-studio#resolve-usb-issues
Has anyone else experienced this problem? Is anyone able to connect to their Android phone from their Chromebook?
Go to your device's setting, the about this phone, software information then click 7 times, VERY FAST, on the build model. It will create a new folder named "Developer options" on the bottom of the page. Go there and click depuration through USB.
This should work.
Try this link for more information https://android.gadgethacks.com/how-to/activate-developer-options-your-galaxy-s10-0194524/

How can i run my android application on nexus 5 mobile phone

Android Studio 2.1.2,
Android 6.0 API Level 23,
Mobile Google Nexus 5,
I am trying to debug my application on my mobile phone instead on the emulator. Adb didn't show my nexus 5 in the connected device. Adb says USB device not found.
Although windows explorer shows device is connected.And I have also enabled USB debugging and developer option mode on the nexus 5 mobile.
How can i run my android application on nexus 5 mobile phone.
Please help
You will need to begin by going to the SDK Manager. Since we have been using Android Studio so far it is just as easy to navigate to it through the IDE by going to Tools->Android->SDK Manager.
Search for “Google USB Driver”
Then make sure you place a checkmark in “Google USB Driver” and hit the install packages button.
For 32 bit user go to:
C:\Program Files (x86)\Android\android-studio\sdk\extras\google\usb_driver”
And for 64 bit user go to:
C:\Program Files\Android\android-studio\sdk\extras\google\usb_driver”
Click on android_'winusb.inf' and install it.
After the installation go to your device.
In setting tap on “Developer options” and place a checkmark in “Stay Awake” and “USB Debugging”.
Now connect your device to your USB port on your computer.
Place a checkmark in the “Always allow from this computer” and hit “OK”. You are now free to open Android Studio and run your app on your local device!
u can download this driver via this link http://adbdriver.com/upload/adbdriver.zip
and Enable Developer Options
and Enable "USB Debugging"
Download ADB Driver Installer from http://adbdriver.com/downloads/ and open it.
Connect your device to your USB port on your computer.
When your device appears in the ADB Driver Installer, select it and hit install button.
Now you have successfully installed the driver and your mobile will be connected.

Android Studio 2.0 launch APK on another device

Since Android Studio 2.0 and its reworked "build / run" mechanism, I can't "launch" an APK on a second device anymore. Once the APK has been loaded on the first device, I can't choose to launch a build to another device.
"Run" will target the current device
"Re-run" will stop the application running on the current device and upload it to the "second" device.
So my question is : "How can I launch a "second" build targeting a different device than the first device I builded on without terminating the first process ?"
Sorry for my bad english, this is not my native language.
If you click the stop button (Red Square), the Instant Run is deactivated. Then click the Run button the list of devices appears again.
The drawback is that when you click on the stop button the application is killed on the current running device.
We need a way or a shortcut to bypass Instant Run
Disconnect the device, click on the "play" button. Android Studio ask you now where to run the app.
Connect your device and select it.
On of the helpful method I found through which at-least you don't have to disconnect your already connected device to run the app on another device.
Click on the arrow down icon near to run option and select Edit Configuration.
It will open Run/Debug configuration dialog box, uncheck the checkbox "Use same device for future launches".
Next time when you will hit the run button, Android Studio will ask you to select the device.
When you deploy to your first device, make sure you have not selected to launch on the same device for future launches. Untick in your case.
Should you have already had this option on, and it is running on the same device, then unplug the device it is launching on, or turn off the emulator.. and it will ask you which device you now want to launch on.

Mobile device can not be connected to computer to run Apps in Android

Every time when I plug my phone to the computer via USB cable to run my apps in Eclipse or Android studio IDE, it's not possible to execute the apps. And it gives the following error,
Android Studio:
enter image description here
Although I tried to kill and restart adb.exe in "Task-manager" or "command-line" the problem didn't solve. Even I created file restartADB in my sdk path\platform-tool and tried to execute it but I still got this error
Eclipse
enter image description here
And it's not possible for me to use Android virtual machine to test my apps

Android Studio won't run application from studio ide?

I've got an application I've been working on and am having an issue with android studio. When I click "build->run" and then select my device, the application never runs on my phone (and the log in android-studio that automatically comes up does not have anything, whereas in the past when I have used this feature it usually says something like, "waiting for phone..." and then the application pops up and automatically opens on the phone and you get some other pertinent information). I have the phone already in developer mode with the install from unknown sources set to on. When I manually move the application from its gradle build location to the phone and then install it manually in file explorer, all is well and the application performs as expected. As I need to debug, however, this is not a very viable solution. Anybody have any advice as to how to get it to run from the IDE? I have tried rebuilding and invalidating the cache/restarting android studio, to no avail.
When I click the run tab at the bottom I have an empty window. When I click the debug tab, I see:
Waiting for device.
Target device: samsung-samsung_sm_g920a-randomIntegerId
Uploading file
local path: /home/eric/Documents/class/OOSE/final_project/2015-group-17/project_code/android/Place2B/app/build/outputs/apk/app-debug.apk
remote path: /data/local/tmp/oose2017.myApp
Note: I am building the application on a LUbuntu 15.04 VM on a windows 8 host, and am using the latest version of android studio.
EDIT: gradle console indicates a successful build as well (obviously since moving the .apk manually to the device works properly).
Open 'Run->Edit Configurations...', and look for your app module in the column on the left-hand side.
Select it, then go to the 'General' tab.
Under the 'Activity' section, there are a couple of radio buttons. Make sure that 'Launch default activity' is selected.

Resources