[TIMOB-16067] Windows: No Android Devices Found
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-12-23T19:10:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Tooling |
Labels | triage |
Reporter | Andrew Greenstreet |
Assignee | Chris Barber |
Created | 2013-12-04T17:47:39.000+0000 |
Updated | 2017-03-31T21:52:59.000+0000 |
Description
Using Titanium Studio, build: 3.2.0.201312031529 under windows 8.1, no Android Devices are found so an app cannot be compile or tested. Switching to Studio 3.1.2 using same SDK, devices are found.
Attachments
All, please try to reproduce the issue with the latest 3.2.0 SDK: * The original report indicates Studio 3.2.0.201312031529 (13 days old), but no indication of SDK version * [~mrahman] tried with SDK 3.1.3.GA, but no versions of 3.2.0 Please try with both the latest version of 3.2.0 SDK (and note the number). Also, try with the latest 3.1.3 SDK + 3.2.0 Studio (and note that specific version too)
Tested on the configurations below with the sample code given above, but could not reproduce. All the times the build was successful & the app launched successfully on the device.
CLI : 3.2.0-cr3 ----> Latest SDK: 3.2.0.v20131216064236 -----> Latest Appc Studio Appc : 3.2.0.201312151544 ----> Not Reproducible
CLI : 3.2.0-cr3 ----> SDK: 3.1.3.GA -----> Latest Appc Studio : 3.2.0.201312151544 ----> Not Reproducible
CLI : 3.2.0-cr3 ----> Latest SDK: 3.2.0.v20131216064236 -----> Latest Ti Studio : 3.2.0.201312142258 ----> Not Reproducible
CLI : 3.2.0-cr3 ----> SDK: 3.1.3.GA ----> Latest Ti Studio : 3.2.0.201312142258 ----> Not Reproducible
Tried from CLI 3.2.0-cr3 using SDK : 3.2.0.v20131216064236 ----> Not Reproducible
Tried from CLI 3.2.0-cr3 using SDK : 3.1.3.GA ----> Not Reproducible
Environment: Windows : 8.1 CLI : 3.2.0-cr3 Appc Studio: 3.2.0.201312151544 Ti Studio : 3.2.0.201312142258 Ti SDK : 3.2.0.v20131216064236 , 3.1.3.GAThis issue needs further investigation. I noticed another issue on my machine today so it is a worthwhile for engineering to work directly with Mostafizur to diagnose this issue further. I will open another ticket for the issue I ran into. [~mrahman] Run the following command and attach the output here. titanium info Attach build output log that shows the encryption error.
"adb devices -l" lists my device but Ti 3.2 doesn't find it Fedora Linux with 3.2 GA
[~michael] can you please post the results of running "titanium info" on the command line?
thanks. Can you try running "ti sdk select 3.2.0.GA" and then re-running the "ti info" command?
To solve this, it should just be a matter of restarting ADB. That should fix [~michael]'s problem. Simply run:
It is not uncommon that ADB gets in a weird state that is hard to detect. According to [~mrahman]'s log files, his problem has nothing to do with this issue. [~mrahman], please create a new ticket describing your problem with JavaScript encrypting include the log files with TRACE output. It's very important to have TRACE level output because it will show us additional debug information. You can enable trace logging by selecting "Trace" from Titanium Studio's console log level menu (generally in the lower right region). You can also set it at the command line by running "ti config cli.logLevel trace".
We're going to re-resolve this as "Can't reproduce" since the error here is specific to Windows. We feel the remaining issue is captured in TIMOB-16073 (for JavaScript encryption. We need a new issue for the error reported with Linux. One thought is that we explicitly test on Ubuntu, but not Fedora, and that might be the reason for the error. If you could please file a new ticket and mention it here, we'd be happy to investigate.
I found that you have to set your SDK using the CLI. If the CLI is stuck on an version of the SDK pre 3.2, then studio won't find the Devices.
Thank you, Andrew, for the suggestion. I now did a forced sdk install in the cli, so "titanium sdk install 3.2.0.GA –force”, and I quitted Titanium and re-run it. Now the Run button is greyed out. Under menu Run/Run Configurations I still get the message that no Android devices are connected. Also now the "ti info" agian gives no answers anymore because of a permission problem (Error: EPERM, operation not permitted 'C:\Program Files\Windows NT\Bureau-accessoires' which I also find very disturbing.
[~erick] I think your error is related to TIMOB-16074.
Hi Chris, thank you for your reply. After pc restart, the "ti info" does again give normal information as listed above, so I cannot reproduce the EPERM error. Nevertheless, I tried the solution that was suggested for the EPERM error (TIMOB-16074), but in my case there was no C:\users\..\AppData\Roaming\Titanium\mobilesdk\lib, so I cannot remove the genymotion.js file. But next time I get the EPERM error again, I will check carefully if I see a link to a file location like that. But for now, I am still stuck. So Ti info does give the information I listed above. And still no Android device is seen. Any idea how that problem could be solved?
[~erick] Can you see your device when you run
adb devices
? If yes, then runti info -t android
and you should see your device listed under Connected Android Devices. If you do not see your device underadb devices
, then runadb kill-server
and try again. If your device shows up inadb devices
but not inti info -t android
, then ensure Titanium has the correct path to the Android SDK by runningtitanium setup android
and try the steps above again. Also, you have installed the Android USB driver, right? It's inC:\path\to\android-sdk\extras\google\usb_driver
.Chris, I made a big step further thanks to your answer. It must have had something to do with that usb driver indeed: the folder name you specified in extras did not exist. So I reinstalled android sdk with the extras for usb. Now at least Titanium does recognize my device. Thank you for that! I now get stuck in the next error, which may be related to the problem I had before. Titanium does see my device, I ask to Run on that device. It says: Building for device. ... Forcing rebuild. Then it copies previous files to new locations that are apparently needed for the new Titanium version. So from Workspace\projectname\Resources to Workspace\projectname\build etc Having done all of that, it says "Encrypting Javascript files: C:\...win32.exe ..." 32-bit titanium prep failed, trying using 64-bit "Encrypting Javascript files: C:\...win64.exe ..." events.js:72 throw er; // Unhadled 'error' event I saw other people having a similar error (http://developer.appcelerator.com/question/157016) It was suggested to change environment variables. But which ones need to be updated? In http://docs.appcelerator.com/titanium/3.0/#!/guide/Software_Locations_and_Environment_Variables-section-29004844_SoftwareLocationsandEnvironmentVariables-WindowsSoftwareLocations the variables related to Titanium are all not available (N/A). Sorry for all these questions...
[~erick] That's an easy fix. From the command line, run:
Hi Chris, Hm, no easy fix I am afraid. As you said, I did "titanium sdk install --force --default". The result was that after the install was ready, again it did not see my device anymore... I then saw that "ti info" also did not work anymore... So I again deleted the genymotion file. That made "ti info" to work again. Titanium still did not see my device, but when I restarted the computer and rerun Titanium... ...YES! It runs!! Titanium does see my device, and I was able to install an app on it. Great, thank you for all the help, Chris!!!
Closing ticket with reference to the above comment that the issue is now fixed.