Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16188] Studio: Cannot locate Android SDK with 3.2.0 release even when it is configured properly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-03-23T02:13:50.000+0000
Affected Version/sRelease 3.2.1
Fix Version/s2014 Sprint 02, 2014 Sprint 02 Core, Release 3.3.0
ComponentsAndroid, CLI
Labelsn/a
ReporterHalil İbrahim Karaalp
AssigneeChris Barber
Created2014-01-12T17:56:48.000+0000
Updated2017-03-21T22:05:48.000+0000

Description

Steps to Reproduce

Clean install on Windows 8.1 Single Language (Turkish) Enter android sdk path to Window>Preferences>Platforms>Android

Actual Result

No Android SDKs were found under the specified SDK location

Expected Result

Locate SDKs successfully

Attachments

FileDateSize
.log2014-01-12T17:56:57.000+000066069
2.1 titanium select sdk output.txt2014-01-14T19:53:23.000+0000262
2.2 restore-defaults-output.jpg2014-01-14T19:53:23.000+000057670
2.3-studio-dashboard-after-restart.jpg2014-01-14T19:53:23.000+000067992
2.4-studio-platform-preferences-after-restart.jpg2014-01-14T19:53:23.000+000058874
android list.txt2014-01-14T23:25:58.000+00005681
diagnostic2571038984835126376.log2014-01-12T17:57:07.000+000014162
preferences.jpg2014-01-13T20:59:33.000+000078762
TiInfo.txt2014-01-12T17:57:10.000+000010098
ti info.txt2014-01-14T23:13:31.000+00004210
titanium config.txt2014-01-13T20:59:33.000+00001090
titanium sdk.txt2014-01-13T20:59:33.000+0000860

Comments

  1. Ritu Agrawal 2014-01-12

    This appears to be a known issue described at TISTUD-6007. Studio fails to recognize a valid Android SDK location if the android.sdkPath hook (in 'titanium config') refers to a different path. To work around the problem, you can use the command 'ti config android.sdkPath c:\path\to\android\sdk' to set the path on CLI, restart Studio and configure the same path in Studio preferences. Let us know if it resolves the issue.
  2. Halil İbrahim Karaalp 2014-01-12

    Thank you for your response but i've allready tried that, no success. I tried again after your comment but still nothing changed. I can share any additional information if needed.
  3. Praveen Innamuri 2014-01-13

    From the 'ti info' command output it appears that though 3.2.0.GA SDK is installed on the machine, CLI is still configured to use 3.1.0.GA as the default SDK. Can you provide me additional information to investigate further : 1) Output for the command 'titanium sdk' 2) Screenshot of the Android preference page to see the error when the SDK location is configured to "C:\android-sdk" 3) Output for the command 'titanium config'
  4. Halil İbrahim Karaalp 2014-01-13

    I've added below files... Output for the command 'titanium sdk' Screenshot of the Android preference page to see the error when the SDK location is configured to "C:\android-sdk" Output for the command 'titanium config'
  5. Ritu Agrawal 2014-01-14

    Moving this to engineering for further evaluation as the output from different "titanium" commands indicate that Android SDK is installed and configured properly but Studio fails to detect the SDK.
  6. Halil İbrahim Karaalp 2014-01-14

  7. Praveen Innamuri 2014-01-14

    Thanks [~halil] for providing the information. Before I get access to your machine remotely, can we try couple of things -

    Can you set the default SDK for CLI to be 3.2.0.GA, using the command 'titanium sdk select 3.2.0.GA'

    Restore Defaults for the Android SDK preferences. Restart Studio and then verify whether Studio recognizes the SDK location.

    If they didn't work, then I would be happy to assist you through remote connection.
  8. Halil İbrahim Karaalp 2014-01-14

    Thank you for your responses. It's really important that the customer support exists behind the studio imho. I've tried your directions but still studio doesn't recognize android sdks.
  9. Praveen Innamuri 2014-01-14

    Sure Halil. I would be happy to investigate the problem by remotely logging into your machine. Can you provide me the best time slots available so that I can setup a meeting ?
  10. Halil İbrahim Karaalp 2014-01-14

    Can you send me an empty email to ikaraalp@gmail.com We can talk about connection details. I'll stay online till 00.40 today and tomorrow between 09.00-13.00 But your availability is more important. I'll try to arrange my time according to your availability. I'm at GMT+2
  11. Halil İbrahim Karaalp 2014-01-14

    ti info -t android
  12. Michael Xia 2014-01-15

    Transitioning to TIMOB given it looks that CLI is having problem finding the list of Android SDKs in the specified directory.
  13. Halil İbrahim Karaalp 2014-01-15

    Hi Praveen, I'm adding extra information that you've asked. I've these in my system path C:\Java\jdk1.6.0_45\bin;C:\nodejs\;C:\android-sdk\tools\;C:\android-sdk\platform-tools\;C:\Python27\;C:\Git\bin\;C:\Users\Halil\AppData\Roaming\npm\;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\; Output of C:\Users\Halil>where android C:\android-sdk\tools\android.bat C:\>android list & C:\Users\Halil>"C:\android-sdk\tools\android" list are same Studio and CLI refers to same android sdk location (C:\android-sdk)
  14. Halil İbrahim Karaalp 2014-01-15

    1. I don't see the add file button now at the top of attachments list in jira ticket. So i couldn't add the output files of above commands. 2. In system path as you see i've set the jdk path to java 6. While i'm installing Studio 3.2.1 it asked me to download and install java 7 and i did it so via studio installer. But after trying everything i've seen (in documents, jira tickets, q&a entries) to show studio the cli path and android path; i downgraded to java 6 again to test if java 7 is blocking studio to see sdks. Because i didn't see anything about that studio uses java 7. Could this situation be about java verstion? If so, i can upgrade to java 7 again and retry your directives. 3. We are talking about Studio can't locate android sdk but, studio also can't verify "Mobile Web Configuration" under "Start a Mobile Web App" in dashboard. I just wanted to inform about that.
  15. Chris Barber 2014-01-21

    [~halil] I'm wondering if it's an internationalization related issue. What language is your system set to? Turkish? Maybe you could try setting your system language to English (may require a reboot) and try again?
  16. Halil İbrahim Karaalp 2014-01-21

  17. Chris Barber 2014-01-21

    Ah! Gotcha! I am able to reproduce the problem. I installed Windows 8.1 and set the language and input to Turkish and indeed 'i' is not what the Titanium CLI is expecting. I think I know a good way to fix this, but it may take some time before the fix gets released.
  18. Halil İbrahim Karaalp 2014-01-21

    Congratulations & thanks :) The upcoming fix will be very helpful.
  19. Chris Barber 2014-01-22

    [~halil] I spoke too soon. I installed Windows 8.1 in a virtual machine and set the language and keyboard to Turkish, but I was NOT able to reproduce the problem you are having with the Android SDK targets from being detected. From everything I've tested, the output for the "android list" command is not localized. You should be able to see the target SDKs in the "ti info" output. I suppose the next step is to start dropping console.log() statements in the android.js file. The location of this file varies, but it is either in C:\Users\Halil\AppData\Roaming\Titanium\mobilesdk\win32\3.2.0.GA\node_modules\titanium-sdk\lib\android.js or C:\ProgramData\Titanium\mobilesdk\win32\3.2.0.GA\node_modules\titanium-sdk\lib\android.js. If we look at the output from your "ti info -t android" command, we see a number of issues. The problem here is it says "Android API undefined (android-5) is too old". It should not say "undefined". If we look at line 579, we see were this message is coming from and we also see that "undefined" is from the info.name variable. info.name is supposed to be set in lines 536 through 554. We split the line on ":" and the left side becomes the key and the right side becomes the value. It should find the "Name" among the keys. It would be interesting to see what a console.log(info); would look like on line 557. It should certainly have a "name" property.
  20. Halil İbrahim Karaalp 2014-01-23

  21. Chris Barber 2014-01-23

    [~halil] OK, cool! So, the Android SDK detection is working. I wouldn't be concerned with the Mobile Web configuration. You probably just need to tell Studio what web browser you'd like to use. Not a huge deal, especially if you're not building a Mobile Web app. The run on device problem is concerning. The first thing I would check is if "adb devices" can see your device. If yes, then run "ti info -t android" and see if Titanium can see your device. If it can't, try restarting adb by running "adb kill-server", then "adb devices" to start the server and detect devices. Finally run "ti info -t android" again to see if Titanium can see your device now.
  22. Halil İbrahim Karaalp 2014-01-23

    I don't concern with mobile web too. And also i dont develop for mobile web now. I told you that just for if it makes sense about titanium localization issues. I've tried to reproduce android sdk detection issue for hours but i couldn't do it. Studio detects android sdk sucessfully now. Sorry about losing the faulted platform but i was trying to fix the problem because i've projects that i've to finish soon and i'm running out of time. Next thing is running on device. I can see the device on "adb devices" and also on "ti info -t android" and also on studio device list near the run button on the toolbar. When i try to run from studio it says: Titanium Command-Line Interface, CLI version 3.2.0, Titanium SDK version 3.1.3.GA Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved. [ERROR] : Invalid "--target" value "devıce" [ERROR] Application Installer abnormal process termination. Process exit value was 1 But i can compile and run on device from command line with this command node C:\Users\Halil\AppData\Roaming\npm\node_modules\titanium\bin\titanium --no-colors --no-progress-bars --no-prompt build --platform android --sdk 3.1.3.GA --log-level trace --target device --android-sdk C:\android-sdk --device-id mydeviceid --skip-js-minify I'm using 3.1.3.GA because i get this error on 3.2.0.GA on studio and i get this error on command line [INFO] Encrypting JavaScript files: C:\ProgramData\Titanium\mobilesdk\win32\3.2 .0.GA\android\titanium_prep.win32.exe "com.kaitek.verimot" "C:\Users\Halil\Docum ents\Titanium_Studio_Workspace\Verimot\build\android\assets" "app/autowatch.js" "app/config.js" "app/indicator.js" "app/login.js" "app/main.js" "app/settings.js " "app/timer.js" "app/update.js" "app.js" "libs/myjui/base.js" "libs/myjui/compo nent.js" "libs/myjui/myjui.js" "libs/myjui/uicomponent.js" "libs/myjui/window.js " "NavigationController.js" "TestWindow.js" "_app_props_.json" [DEBUG] 32-bit titanium prep failed, trying again using 64-bit [INFO] Encrypting JavaScript files: C:\ProgramData\Titanium\mobilesdk\win32\3.2 .0.GA\android\titanium_prep.win64.exe "com.kaitek.verimot" "C:\Users\Halil\Docum ents\Titanium_Studio_Workspace\Verimot\build\android\assets" "app/autowatch.js" "app/config.js" "app/indicator.js" "app/login.js" "app/main.js" "app/settings.js " "app/timer.js" "app/update.js" "app.js" "libs/myjui/base.js" "libs/myjui/compo nent.js" "libs/myjui/myjui.js" "libs/myjui/uicomponent.js" "libs/myjui/window.js " "NavigationController.js" "TestWindow.js" "_app_props_.json" [ERROR] Failed to encrypt JavaScript files [ERROR] Unable to locate a valid libjvm.dll. I assumed this is about wrong setted java version. But i didn't focus on this situation when 3.1.3.GA successfully compiles and runs on device from command line.
  23. Chris Barber 2014-01-23

    Hmm, ok, I'll talk with the Studio team about the [ERROR] : Invalid "--target" value "devıce". You should have no problem with titanium prep and 3.2.0.GA after reinstalling it:
        ti sdk install -fd
        
  24. Chris Barber 2014-01-30

    I talked with the Studio guys and we unfortunately cannot reproduce the issue. When Studio does a device build, it will pass in a --target of "device" with the correct characters.
  25. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source