[TIMOB-16188] Studio: Cannot locate Android SDK with 3.2.0 release even when it is configured properly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-03-23T02:13:50.000+0000 |
Affected Version/s | Release 3.2.1 |
Fix Version/s | 2014 Sprint 02, 2014 Sprint 02 Core, Release 3.3.0 |
Components | Android, CLI |
Labels | n/a |
Reporter | Halil İbrahim Karaalp |
Assignee | Chris Barber |
Created | 2014-01-12T17:56:48.000+0000 |
Updated | 2017-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>AndroidActual Result
No Android SDKs were found under the specified SDK locationExpected Result
Locate SDKs successfullyAttachments
File | Date | Size |
---|---|---|
.log | 2014-01-12T17:56:57.000+0000 | 66069 |
2.1 titanium select sdk output.txt | 2014-01-14T19:53:23.000+0000 | 262 |
2.2 restore-defaults-output.jpg | 2014-01-14T19:53:23.000+0000 | 57670 |
2.3-studio-dashboard-after-restart.jpg | 2014-01-14T19:53:23.000+0000 | 67992 |
2.4-studio-platform-preferences-after-restart.jpg | 2014-01-14T19:53:23.000+0000 | 58874 |
android list.txt | 2014-01-14T23:25:58.000+0000 | 5681 |
diagnostic2571038984835126376.log | 2014-01-12T17:57:07.000+0000 | 14162 |
preferences.jpg | 2014-01-13T20:59:33.000+0000 | 78762 |
TiInfo.txt | 2014-01-12T17:57:10.000+0000 | 10098 |
ti info.txt | 2014-01-14T23:13:31.000+0000 | 4210 |
titanium config.txt | 2014-01-13T20:59:33.000+0000 | 1090 |
titanium sdk.txt | 2014-01-13T20:59:33.000+0000 | 860 |
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.
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.
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'
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'
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.
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.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.
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 ?
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
ti info -t android
Transitioning to TIMOB given it looks that CLI is having problem finding the list of Android SDKs in the specified directory.
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)
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.
[~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?
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.
Congratulations & thanks :) The upcoming fix will be very helpful.
[~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 inC:\Users\Halil\AppData\Roaming\Titanium\mobilesdk\win32\3.2.0.GA\node_modules\titanium-sdk\lib\android.js
orC:\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 theinfo.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 aconsole.log(info);
would look like on line 557. It should certainly have a "name" property.[~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.
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.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:
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.
Closing ticket as the issue cannot be reproduced and due to the above comments.