I just installed Android Studio (v1.4) on Ubuntu 15.04 (64) and am unable to connect to my Moto G (Android 5.0.2) to run the application I made from a tutorial.
When asked to choose a device, I get the following choice for my device:
TA9290IPXK [NULL] No, minSdk(API 14)>deviceSdk(API 1) TA9290IPXK
I already enabled USB debugging on the device. when running 'adb devices' I get " ?????????????? no permission " and after killing and restarting the adv server it displays the proper serial ID but when going back to Android Studio it still does not work.
Has anyone encountered this issue ? Can someone provide a suggestion of solution please.
An obvious reason for that error message “No, minSDK(API 14) > deviceSDK(API 1)”, which I didn´t find so far mentioned neither at StackOverflow nor by other forums:
If the AVD Manager option for a virtual device “Emulated Performance - [ ] Use Host GPU” is unchecked, the Android simulator works just on "API 1" level :-(.
So if you try to execute a standard Android app ( e.g. "API 14" level ) with this setting,
The Android desktop screen is not displayed but just black screen with “android” in white letters.
When executing “Run / Device Chooser / Choose a running device / Compatible” again, there is the error message “No, minSDK(API 14) > deviceSDK(API 1)”, if “minSDKVersion 14” is set in the project configuration file “app”.
-
Why should you ever try to run the Android simuator with unchecked option?
Well...If your Win8 or Linux computer really provides OpenGL2 graphics, you may operate the simulator with default setting “Emulated Performance - [x] Use Host GPU”.
But if your Win8 or Linux computer just provides OpenGL1 graphics, as my legacy Win8-32bit notebooks “ASUS Eee PC T101MT” and “Dell Vostro 1000” with standard Windows drivers by Microsoft, the Android Simulator crashes by the error message “APPCRASH”, “Fault Module name: libOpenglRender.dll”.
And so by unchecking the option, you can´t run Android apps requiring a usual API level ( API 14,... ) :-(.
Read this article about the incomplete rollout of OpenGL2 drivers for Win,Linux and MacOX on current and legacy computers :-(:
https://github.com/processing/processing/wiki/OpenGL-Issues
Sincerely
Rolf
Ok I found the solution
Turns out I had 2 ADB installed in different Paths and Android studio was getting one of them that was not the correctly configured. I also had not properly set up the udev rules.
Here are the step I took to get it fixed
1. Remove ADB that was installed manually
2. Modify the udev rules to add the devices (It turns out that both my Nexus 7 and Moto G were not Asus and Motorolla respectively but Google inc instead. I acquired the right Vendor ID code using "lsusb" It returns XXXX:YYYY the vendir iD is the XXXX
3. Add the location of the right adb to path ( /Sdk/platform-tools/)
4. Then rebooted all of the devices (computer and android devices) and it seems it worked.
Sorry for not giving out all the terminal lines that were entered, being novice with Ubuntu it may have been a lot more confusing than helping.
Hopefully it can help someone that is in the same situation.
You have to set to connect as camera(even after usb debugging is already enabled)
Thanks to #Jorch914
i already found the solution to this. in order to solve this one, is go to Gradle > Build.gradle(module:app) > and then change the minSdkVersion that is compatible with your phone. Hope this help! :)
When I plug my Galaxy S6 Edge into my computer, Android Studio does not recognize it as an available USB device. I've tried to download a USB Driver update and I have USB Debugging checked on my phone, but nothing is working. What else do I need to do in order to run my app on my phone?
If your settings (S6 USB debugging, driver, Android Studio) are correct, you might try the following:
(On phone) turn USB Debugging OFF
Connect S6 to USB
Click on the notification "connected as MTP device", check the option "camera" (also appropriate for non-MTP connection)
turn USB Debugging back ON
If your device runs Android 6, the notification (step 3 above) should say "Use USB for" and offer 4 choices. You want to click on "Transferring Images".
I had the same problem. I tried with another USB cable (Not the one comes with my s6 edge or any samsung product ) and it worked.
(prior to this i spend almost a day by installing some software and all :(..but only above solution worked for me )
If you see the connected device in the "Other devices" of the Device Manager, try adding "Hardware Ids" of it to android_winusb.inf. Then select "Update Driver Software" in the Device Manager.
The detail can be found in the link below. In my environment, adb_usb.ini was not there, so I skipped it but could recognize my Galaxy S6 Edege.
http://jodieorourke.com/view.php?id=190&blog=news
There are different ways how to connect USB device.
MTP - to enable remote computer browse device's files. Need to be accesible for windows explorer.
Camera - device works as media (photos, videos, music) provider - these media could be imported to other device like PC. Typical usage is with Photo managing SW on PC like Zoner Photo Studi, LightRoom, ...
MIDI (Iam not sure, but another standard how to share music device)
Power only - device does not provide any functions to connected computer, it use only its power over USB cable.
So, change type to MTP or CAMERA and android studio show see your device.
W
Make sure you have enabled developers option this can be enabled by 7 times tapping on Build number in settings ---> About phone.
I know I'm a bit late to answer, but maybe it will help other people in future. Me too I've got a Samsung S7 Edge, and couldn't debug with it. After some checking I realized that the reason is the Knox/My Knox. See here: https://seap.samsung.com/forum-topic/can-i-use-usb-debugging-mode-device-running-knox
What I've done is just go to playstore, found there My Knox and clicked Uninstall, then switched on USB debugging in Developer options that was previously grayed out.
(There are some other manuals on how to disable Knox. Some of them require rooting, but after rooting, I believe Samsung warranty will not work, if something happens to your phone. )
This is quite a common question, but none of the solutions appear to work for me. First time asker, so apologies if I get the conventions wrong.
I am trying to connect my Galaxy S5 to my computer running Ubuntu 14.04 so I can do some android development. I have recently downloaded and installed Android Studio and the SDK and my device is detected when it's connected via USB but the device either appears as 'unauthorized' or 'offline'. I know I should be expecting the RSA key prompt but this never appears.
I have tried:
Checking debugging was enabled
Running adb kill-server and adb devices
Restarting (the device, developer options, the machine)
Simple unplugging and replugging the USB cable
Checking my adb version (it is 1.0.31)
Trying different USB ports
Revoking USB debugging authorizations
Toggling enabling ADB Integration from within Android Studio
Connecting as PTP device and MTP device
I have tried it on a separate machine that runs fedora and this works fine with no issues, the promopt appears right away. Therefore I imagine it is not the USB cable that is faulty.
Any ideas?
Try these:
Unplug and replug the USB cable.
If it still doesn't work, unplug the USB cable, disable then enable USB debugging in the device settings.
If the above two methods fail, reboot the device.
If rebooting the device also fails, reboot Android Studio too.
If reboot Android Studio still fail, try adb kill-server then adb start-server.
Try killing adb adb kill-serverthen disable usb debugging and then start adb by adb start-server then enable usb debugging and plug phone again and huh don't let phone sleep between process
EDIT
There turned out to be a problem with my laptop's ADB RSA key. I'm assuming my G3 was rejecting a bad key and disallowing my laptop to connect to it via ADB.
ADB saves a key file in one of multiple places on a Windows computer, the first is in the location where adb.exe is (C:\android), the second is in the user's >profile (C:\Users*username*.android), the third place is in the Windows system files (C:\Windows\System32\config\systemprofile.android), the file is >simply named "adbkey" with no extension. If there is no key file when ADB runs, it will generate one automatically.
Mine was located in my user folder (C:\Users*username*.android). All I had to do was delete the adbkey file (there was also a file named "adbkey.pub" which >I deleted as well), restart the adb server in command prompt (adb start-server) and plug my phone in. I instantly received the RSA Fingerprint Key window on my >G3 allowing connection between the two devices. Then typing "adb devices" returned my phone's serial number followed by "device" showing it was available. >I went back to the C:\Users*username*.android\ folder and sure enought there were new "adbkey" and "adbkey.pub" files.
got from XDA
EDIT 2
TRY this steps too
Navigate to where .android is stored
open .android and delete file named as adbkey and adbkey.pub
Start ADB then typeadb kill-serverand adb start-server
My fix to this issue:
Android settings
Developer options
Revoke USB debugging authorizations
Replug in device and accept authorization as usual.
Profit
Step 1: Turn off USB DEBUGGING in Developer Options
Step 2: Remove USB Cable
Step 3: Turn on USB Debugging(This rests USB Configurations)
Step 4: on Command Prompt enter adb kill-server and then adb start-server
Step 5: Connect the USB Cable
Step 6: Check Devices connected in Run in Android Studio(you should be able to see your device listed)
Step 7: If you want to continue running using the cable this would be good enough
(If you want to do Wireless Debugging continue with below step)
Step 8: type adb tcpip 5555. If no error is displayed remove USB Cable
Step 9: Look up IP Address of your phone from About abd then type adb connect xxx.vvv.b.n(your phone's IP)
Step 10: Check in Devices in Android Studio again and you shud see you r device in List of devices. If yes,
If you are on windows and you encountered the same problem, try killing the adb.exe process from task manager and then rerun your app.
Change the USB cable !!!!
I can't explain this technically, however after a lot of trial and error, this what have worked for me.
Could not get Samsung Note II (N7100) to connect.
Step 1. Follow answer from user4847410 above. Next time you connect your phone it will come up with an authorisation message and you're in.
Step 2. I also swapped my cable.
Step 3. Check USB port as if you install on one particular port then another port may not be ok for you.
Note: made two batch files
adb-fix.bat
adb kill server
adb start server
pause
adb-devices.bat
adb devices
pause
-- voted for that correct answer but I don't have enough kudos so it was removed! --
To fix this, use USB2 instead of USB3
A shorter cable did the trick.
It turns out that the wire thickness used inside the cable impacts on the resistance of the cable assembly – this resistance causes energy loss inside the cable when an attached load draws a current, and causes a voltage drop which can reduce the voltage to the end device to a point where it is not possible to charge quickly or completely.
http://goughlui.com/2014/10/01/usb-cable-resistance-why-your-phonetablet-might-be-charging-slow/
Change your USB Preferences to File Transfer if you use your smartphone to debug.
There are several option :
File Transfer /* Choose this one */
USB Tethering
MIDI
PTP
No Data Transfer
I had a long white cable. Just wouldnt stay connected. Switched to another, shorter, black cable and it works 100% of the time.
Disabling and Enabling the Developer options and debug mode on the Android phone settings fixed the issue.
Earlier for almost 3hrs I did:
I tried everything given in several sites and my android device never came online.
when I was running adb kill-server and then adb-startserver the "Device File Explorer" on the right bottom of the android studio showed "Device is not online (DISCONNECTED)".
Here is how solve this:
Revoked all USB debugging authorization on the device under "Develop options"
And I added sudo to command "sudo adb kill-server" and then " sudo adb start-server".
After this the message in "Device File Explorer" in android studio changed to "device is pending authentication please accept debugging session on the device". But no message appeared on the device. Tried stopping-restarting adb, connect reconnet usb cable, stop-start usb debugging but nothing worked.
Went back to device and changed the device usb settings from usb charging to "PTP", and, restarted the Android studio. And, boom, the message appeared on the phone to accept the debugging session on device.
use this command
-> adb disconnect
-> adb connect <ip address for your mobile:port number>
Eg : adb connect 192.168.2.58:5555
You can try this:
Go to tools/enable adb integration and uncheck it.
now check it and run again. Next time, android studio will restart adb and it may find your device.
Restart adb by issuing these commands in cmd
adb kill-server to kill existing adb session followed by adb start-server to start a new adb session
Disable and re-enable USB debugging on the phone and accept RSA fingerprints if asked by phone
Rebooting the phone if it still doesn't work.
If all above don't solve your problem, you may try delete environment variable named "ANDROID_SDK_HOME".
It really solved my problem. Hope it Help you!
This fixed for me
uncheck launch in tool windo
Source
https://github.com/google/android-emulator-m1-preview/issues/76#issuecomment-1023563846
This problem is because you have used an old adb version and not support on your device. or you have more than one adb
The key is:
make sure you have a latest adb executable on your SDK
Make sure to run adb command from "SDK_DIR/platform-tools/" because this should be the latest version (type command "which adb" to check) if u have more than one adb file, you can rename another one.
in my case, on my Windows 7 i have one more adb on "C:\Windows\adb.exe" and its an old version, so my adb command always run from that file. I fixed the problem by running adb form my sdk directory "SDK_DIR/platform-tools/adb.exe"
On windows--> Launch your terminal from the platform-tools folder inside android sdk.
Then use the following commands
adb kill server
adb start server
it should work
Try upgrade your Android SDK Platform as below steps:
Run the SDK Manager
Execute "Install packages…"
Restart the SDK Manager
I tried and it's ok for me.
ref: link
You maybe having an older version of the ADB, Update the tools package and that should bring down the latest ADB.
I also recently had this problem and I solved it by rebooting Android Studio. But my friend had to have the original cable for his device, no other cables worked.
In my case (same problem - that Nexus 5 is connected but with "offline" status) the problem was solved by "Invalidate caches and Restart" in Android Studio.
Suppose that problem was in adb and restarting Android Studio causes to adb restart.
Download and Install your device driver manually through visiting manufacturer website like :Samsung,micromax,intex etc.
In my case the problem was that I used a USB extension cable. As soon as I plug the microUSB cable right into the PC the device has detected.
In my case, turned out that you need to be logged as owner of device to properly accept the USB debugging.
Tried the "Disable and re-enable USB debugging on the phone" step but didn't get the RSA prompt on "normal" user, switched to owner and tried again and got it.
I had this issue on a device with USB-C using a microUSB cable with a USB-C adapter. After switching to a USB-C cable without any adapter it worked. I only saw this issue on a LeEco.
I tried most of the things on this page and none of them worked for my Samsung S5. However, when I switched the cable to a USB-C type the problem seemed to be solved...until next time.
Besides the solution mentioned above, try to download Samsung's Android USB Driver for your platform. Here is a link to the Windows one:
https://developer.samsung.com/galaxy/others/android-usb-driver-for-windows
If your app doesn't manipulate WiFi connections - another slightly different solution, which bypasses USB issues entirely - enabling a wireless debugging connection - ADB over WiFi/TCP/IP.
I am trying to use a FireFox OS device that runs OS 1.3 on my app dev. I have went through the instructions and still there is no device name that i can test an app with. Are there windows drivers that have to be installed. It seems like everything was installed but there is no device name. I am not sure if I gave my phone an actual name on the setup menu but I would think there would be a default menu. The only thing is that I have not installed a simCard because I do not need the phone I just want to test my apps before they go up on the Firefox OS marketplace.
Note 1: When I plug in the phone it causes firefox OS to flip back and forth between the browser and the develop manager that opens when the web tools kit is opened.
Instructions that I found for the phone that I have ZTE OPEN FireFox OS
Power off your phone, remove the battery to access the microSD card and extract the card from its holder.
Connect the microSD card to your desktop machine.
Move US_DEV_FFOS_V1.1.0B04_UNFUS_SD.zip or EU_DEV_FFOS_V1.1.0B04_UNFUS_SD.zip (depending on the version you downloaded) to the root directory of your microSD card. Do NOT unzip the file.
Disconnect the microSD card from your desktop computer and return it to your phone.
Hold the volume up button and power key down simultaneously. Volume up is activated by pressing the upper part of the long key on the left side of the phone. If you did it properly, you’ll enter the Firefox OS recovery mode. (Note: the Firefox OS logo may display briefly before you enter the recovery mode; sometimes this can take a little while.)
Use the volume up/down key to move from one item to the other in the menu, and choose “apply update from external storage.”
Press the power key to confirm the selection. You’ll see a new screen listing the files you have on the microSD card.
Again use volume up/down key to select the firmware: either US_DEV_FFOS_V1.1.0B04_UNFUS_SD.zip or EU_DEV_FFOS_V1.1.0B04_UNFUS_SD.zip (depending on the version you downloaded), and press the power key to confirm.
If everything went well, you’ll see a sequence of status messages, culminating with one that says, “Install from sdcard complete.”. You’ll need to select “reboot system now” after the installation has completed. Your phone will then reboot, and you’ll see the configuration screen you saw the first time you powered on the phone.
I would like to know if there is a tool simillar to mymobiler for Wince 5.0 which I can use to control the device from my desktop.
I use mymobiler (v1.25) but I believe it controls only devices running on WM5 and above.
Any help would be highly apprecited as the screen of my device has stopped working.
I use MyMobiler myself when I am coding for WinCE5.0 (not very often but I do know that it works.)
In your extracted MyMobiler zip file is three versions of remote.exe.
remote.exe
remote.exe.50
remote.exe.40
The only one I have gotten to work on wince5 is remote.exe.40
Just rename the existing remote.exe file (remote.exe.wm) [you may have to click tools, folder options, and uncheck hide extensions for known file types]
Next rename remote.exe.40 to remote.exe.
After that you are good to go. Copy remote.exe to the device through activesync (xp) or WMDC (>XP) and launch it on the device. It was a bit funny connecting for me the first time - I click connect on pc, then had to click the tray icon on the device, and click connect.
Good Luck!
Link to Video Showing it Running 1
This does work, the auto-install doesn't seem to work but if you copy the remote.exe over as mentioned (any location will do), then start remote.exe, click on the MYMobiler icon in the tray and select Connect, it will attach to your PC like the WinMobile version does.
Also, check the ini files in the MyMobiler directory. There's some details on the features/options.
I can confirm that Dave and Mike's solutions work on Windows CE 7 as well.
I was getting an error with the AYGSHELL.dll library when starting My Mobile after the gun was connected.
Run Mymobiler.exe before you connect the scanner to the PC and then connect to the PC using the tray icon from the gun. No error.