bharal
bharal

Reputation: 16164

appcelerator studio cannot find device

I'm using appcelerator studio version 4.6.0.201605201934

I'm using a nexus 6P, and windows 10

The phone has debugging enabled, and has MTP mode selected. File-Explorer detects the phone each time it is plugged in and tries to download photos from it.

I have put the google USB folder in the android/sdk/extras/google/usb_driver folder

I can see my device on the command prompt by going to the android/sdk folder

adb devices -l

HOWEVER when i go to appcelerator studio, it does not find the phone - the "run configurations" has an empty list of phones to choose from, and running it leads to it informing me that there is no device connected.

What am I doing wrong?

Upvotes: 2

Views: 1422

Answers (2)

Yahya Uddin
Yahya Uddin

Reputation: 28841

I have been using Titanium for some time and I also have the same issue regardless of what device or USB port I use. I even have the issue with simulators.

So I do the following instead:

# Install the application (replacing the existing one if it exists)
adb install -r build/android/bin/YOURAPP.apk

# Run the application (you could also just open the application on your phone)
adb shell am start -n com.package.name/com.package.name.ActivityName

# Show logs
adb logcat "TiAPI:*" "*:S"

The adb tool can be found in windows 10 at this path

/Users/username/AppData/Local/Android/sdk/platform-tools/adb.exe

The activity name can be found in the build/android/AndroidManifest.xml file. It's usually: YourAppNameActivity

More information about logcat can be found here:

https://logmatic.io/blog/a-how-to-guide-to-debugging-with-android-logcat/

https://developer.android.com/studio/command-line/logcat.html

Upvotes: 0

rjcpereira
rjcpereira

Reputation: 953

Have you tried to run the kill-server, and devices commands with the adb path?

In my case:

bash-3.2$ /Applications/Android/android-sdk-macosx/platform-tools/adb kill-server
bash-3.2$ /Applications/Android/android-sdk-macosx/platform-tools/adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

If this still doesn't solve your problem, try to add the Vendor ID of the device to the adb_usb.ini file, usually placed:

Windows: C:\Users\YourUser\.android
Mac OS: ~/.android

You can find the Vendor ID at the hardware info on Mac OS here: /Applications/Utilities/System Information

There is also a list of Vendor IDs at the android documentation: https://developer.android.com/studio/run/device.html

Your file will look, like this:

# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.

0x18d1

Upvotes: 2

Related Questions