I have installed android-SDK (not ADT bundle - actually I don't know its purpose),
Eclipse, added ADT plugin into Eclipse and added several virtual devices.
According to the manual on fb dev. site, I was trying to install facebook with this command:
./adb install ~/facebook-android-sdk-3.5/bin/FBAndroid-3.5.apk
But it turned back this error:
error: device not found
I also managed to import android library from facebook-sdk and attempted to launch an example file. The result:
Failed to install HelloFacebookSample.apk on device 'emulator-5554': device not found
[2013-08-28 17:46:37 - HelloFacebookSample] com.android.ddmlib.InstallException:
device not found
[2013-08-28 17:46:37 - HelloFacebookSample] Launch canceled!
Any idea what have I missed?
Must be one problem of following:
Phone usb drivers not installed.
You not connected.
USB Debugging not enabled in phone.
PC or phone USB port problem.
Related
This question already has answers here:
android studio adb Syntax error: ")" unexpected
(4 answers)
Closed 3 years ago.
I'm using Linux Mint Sylvia on a pretty old laptop that do not support the emulators. Therefore I try to connect my Sony XA2 (pretty new with Oreo, 8.0)
I'm trying to detect my device but I seems to have some problem with Android Studio and the ADB-service.
In the log I get:
9:39 PM Unable to detect adb version, adb output: /home/fredrik/Android/Sdk/platform-tools/adb: 1: /home/fredrik/Android/Sdk/platform-tools/adb: Syntax error: "(" unexpected
If I run the lsusb I can find the device:
Bus 002 Device 011: ID 0fce:51f7 Sony Ericsson Mobile Communications AB
I tried to run the adb devices, but first I got this:
adb devices
The program 'adb' can be found in the following packages:
* adb
* android-tools-adb
Try: sudo apt install <selected package>
So I installed the adb with:
sudo apt install android-tools-adb
Then I could run the adb like:
adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
CQ3000KKV4 unauthorized
But still I got the error above in Android Studio.
Do you guys got any clue?
Best regards
Fredrik
Adb after installation seems to run correct.
Your device is listed as unauthorized so I guess you did not turn on developer tools on your device, or on your device you did not accept debuging with connected computer.
To turn on developer options on device:
Open Settings on your Android O running device.
Select System » About phone.
Scroll down and tap seven times on the Build number entry.
Now go back to Settings » System » and select Developer options from there.
In these options you should allow usb debuging if it’s not on by default.
After connecting usb cable to your device and conputer you should see prompt on your device asking for permissions to allow debuging. If you accept that you should be able to run adb tools, logcat etc on your connected device.
EDIT
Looking at the error you described in comments, it looks like it is error specific for 32-bit version systems. So I see there two possible solutions:
reinstall your system for 64-bit version
or more likely:
downgrade your adb platform tools
How to downgrade adb platform tools:
Download platform tools from this archive:
https://dl-ssl.google.com/android/repository/platform-tools_r23.0.1-linux.zip
Go to your Android SDK folder (so in your case it will bee /home/fredrik/Android/sdk/)
Remove old platform-tools
Insert data from link downloaded above
Hope it will be your case. Please keep in mind that updates of Android Studio will probably restore that error again.
There are other problems that manifest as showing unauthorized even when developer mode is on to allow usb access. Sometimes in Linux you may be running adb in user mode which may not allow usb access. In this case I've needed to disconnect adb and restart it using root privileges.
adb kill-server
sudo adb start-server
Google Sdk adb fastboot usb driver installed.. there is no issues and even not alerting any error message but app build is failing..
There is no use even after installing CTP 3.1 for VS 2013.
Kindly help me on it
As Alan says, VS will try to launch the app on the device if you have selected the "device" option and are trying to run or debug the app on the device. Does building to Ripple work? If its failing only for device, Can you please attach the complete build log?
VS uses ADB to connect to the device and so even though you have installed the driver, the ADB might not be able to see the device.
Can you run the following command to see if ADB lists the connected device:
C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe devices
Also please check whether your device shows up in the windows device manager.
Let me know what you find.
I've followed the instructions at google: https://developer.chrome.com/devtools/docs/remote-debugging. I've also went over the troubleshooting section - but nothing seems to work.
I have samsung galaxy 3 (android 4.1.2, chrome 42.0.2311.111). USB debugging enabled. I've tried restarting the device after ticking the USB debugging a few times.
On windows 8 I run chrome (44.0.2388.0 canary). I've installed Samsung USB Driver, and my computer can see my device.
I do not get any notification when plugging the device nor when opening canary with the inspect page.
Did I miss anything?
Try these steps:
Download and install Android SDK
Open SDK Manager.exe
Select Android SDK Platform-tools and press Install packages...
Open a command prompt and execute these commands:
cd C:\Program Files(x86)\Android\android-sdk\platform-tools (or C:\Users\User\AppData\Local\Android\Sdk\platform-tools)
adb.exe devices
You should receive a response like this:
List of devices attached
ABCDEFG123 device
If your device is listed check if Chrome detect the device, otherwise try to execute this command:
adb.exe kill-server
adb.exe start-server
adb.exe devices
Check again if Chrome detect the device.
If your device is not listed at all after executing adb devices command there is something wrong in your configuration (e.g. incorrect or missing drivers?)
Hope this helps somebody else...
This happened to me because I was trying to Chrome inspect a release build (Ionic; i.e. ionic build android --release). If I build a debug app (ionic build android), I am able to see the app from the chrome inspection tool without any issues.
Google play does not like debugable apps https://developer.android.com/studio/publish/index.html
which is needed for the inspection - see this SO link: debugging an ionic app for android platform hence proper releases won't appear in the Chrome inspection.
In my case the problem was solved changing the usb connection mode in the settings of the Android device to "Camera (PTP)" . For some reason the usb debbuging did not work when connection mode was set to MTP.
This looks like a bug in Chrome or in Android. This helped me: on your android device select USB connection settings (popup which is open on cable connect). It has MTP/PTP/charge modes. Switch between MTP/PTP and back.
Download and install Android SDK
Open SDK Manager.exe
Select Android SDK Platform-tools and press Install packages...
MTP -> PTP
I searched trough many questions and couldn't find an answer that fix my problem.
I'm new on creating Android projects and I'm still getting familiarized with the eclipse platform.
To the point, when I run my project I get this error
No compatible targets were found. Do you wish to add new Android Virtual Device?
I changed the AndroidManifest.xml from targetSdkVersion="18" to "15" (Which is my device level, Android version 4.0.4, correct me if I'm wrong)
Then I clicked on Run Configuration and switched from "Launch on all compatible devices/AVD's" to "Always prompt to pick device", and still couldn't get the project to work.
When I reverted the Run Configuration I get this output everytime I try to run the project
[2013-12-15 21:27:28 - MyFirstApp] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.
What's the meaning of both messages? How can I make it work?
Some details:
Android Version: 4.0.4
OS: Windows XP
Samsung Galaxy S DUOS
Please follow the steps
Step 1
Check if the device driver is installed successfully. If not, download the drivers and plug the device again.
Try this link to download the driver software - http://samsung-kies.en.softonic.com/
Step 2
Click Start-> Run-> CMD. (Go to command prompt)
Navigate to the android SDK platform tools path.
Type adb devices
Now you should get the device listed and a tag "device" next to the device ID
Step 3
If you get "no devices found", type adb kill-server
Type adb start-server
Now type adb devices.
Now you are good to start testing your applications on device.
You have to have Samsung Kies installed on your computer so you can have drivers for your device, also, from eclipse:
window -> show view -> devices
if you don't see your device here, this means either your ADB is not running, or your device is not recognized by your computer
also verify you have debug mode enabled in your device
Do you have the usb debug driver for you device installed? This is the driver that allows your device to "comunicate"with eclipse in order to debug
I've been making some apps for android for quite a while but I've only been using windows 7. Due to some reasons sometimes I'm forced to program in linux so I followed the guide to configure the SDK and eclipse (http://developer.android.com/guide/developing/device.html).
After that I ran "adb devices" and got this:
List of devices attached
???????????? device
As you can see the name is unknown but this also happens in windows so I didn't fret too much over it.
Then I launched eclipse and made a very simple project to test the deployment but here two things happened:
1st- It doesn't detect the android SDK version. (http://img515.imageshack.us/img515/5611/escolha.jpg)
2nd- when I try to deploy I get the following output:
[2010-10-09 23:06:45 - testeAndroid] Android Launch!
[2010-10-09 23:06:45 - testeAndroid] adb is running normally.
[2010-10-09 23:06:45 - testeAndroid] Performing com.examples.teste.teste activity launch
[2010-10-09 23:06:45 - testeAndroid] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2010-10-09 23:09:50 - testeAndroid] WARNING: Unknown device API version!
[2010-10-09 23:09:50 - testeAndroid] Uploading testeAndroid.apk onto device '????????????'
[2010-10-09 23:09:50 - testeAndroid] Failed to upload testeAndroid.apk on device '????????????'
[2010-10-09 23:09:50 - testeAndroid] com.android.ddmlib.AdbCommandRejectedException: device not found
[2010-10-09 23:09:50 - testeAndroid] Launch canceled!
I'm using:
eclipse 3.5.2
adt 0.9.9
android SDK tools r7
android phone: vodafone 845 = Huawei U8120 - android 2.1-update1
Any idea for what is happening?
thanks in advance ;)
The Huawei U8120 (Vodafone 845) phone is one of those USB devices that present themselves as USB storage devices to the host operating system to serve up files for Windows driver installation. To switch them into the USB slave from Linux mode you need to use usb_modeswitch. You can download the latest usb_modeswitch package from the homepage, it includes support for your device. Or just use this call on the command line:
$ sudo usb_modeswitch -v 0x12d1 -p 0x1031 -s 20 -M "55534243123456780600000080000601000000000000000000000000000000"
However to use it with the Android tools you need to solve another problem, because the Huawei U8120 (Vodafone 845) provides no serial number. There might be other workarounds, but the one that made it work for me is a patch for the "adb" utility that can cope with devices that have no serial number.
$ ./tools/adb devices
List of devices attached
noserial-/dev/bus/usb/001/036 device
The patch is here: https://review.source.android.com/#change,13552 and here you can find an "adb" binary if you trust that source :) www.mediafire.com/?oizmyyw0wwz
see also http://code.google.com/p/android/issues/detail?id=4365
You have to update your udev rules according to the manual on http://developer.android.com/guide/developing/device.html - then it will work.
I have also android plataform and just a couple of days, an upgrade seemed to solve the problem. You have to make sudo usb_modeswitch -v 0x12d1 -p 0x1031 -s 20 -M "55534243123456780600000080000601000000000000000000000000000000" and the standard adb, as well the ADT plugin worked in ubuntu 10.04.
My adb version is 1.0.26 and the ADT plugin 10.0.0.v201102162101-104271, since the ADB upgrades forced me to update Eclipse plugin.