Titanium Studio cannot find Android SDK (tried multiple solutions) - android

Okay. I'm kind of at my wits' end here. I've been trying for about 2 days to set up Titanium Studio to recognize and connect to the Android SDK (Windows 7). I have tried multiple solutions (below) with no luck. There's got to be something I'm missing. I've tried Google and the Titanium developer guides. So this is my last straw. Any ideas?
Android SDK home path is C:\Android\android-sdk (to avoid spaces with "Program Files")
installed all SDKs (3,4,7,8,10,11,12,13,14,15), their Samples, and all Google APIs
installed all "Extras" packages
Added both the Android tools and platform-tools directories to Windows' PATH variable
Copied adb.exe from platform-tools to tools as Titanium likes to look there for adb
Installed the current master build of Titanium SDK for Mobile Devices
Created Android Virtual Devices (AVDs) for SDKs 7 and 8 (Titanium's required SDKs)
Restarted adb server and computer itself after each change
On the Titanium 'Dashboard' tab, under 'Configure', I get:
An Android SDK is missing. Titanium requires Android platforms 2.1.* and 2.2.*
When attempting to set the default Android SDK path in 'Preferences', I get:
Could not locate the Android SDK at the given path
Titanium log file output (sorry, kinda long):
!ENTRY com.appcelerator.titanium.mobile 4 0 2012-02-22 14:06:21.992
!MESSAGE (Build 1.0.0.1327639206) [ERROR] [ERROR] The system cannot find the path specified.
[ERROR] The system cannot find the path specified.
Traceback (most recent call last):
File "C:\Users\Stick\AppData\Roaming\Titanium\mobilesdk\win32\2.0.0.v20120221190136\android\avd.py", line 45, in <module>
print get_avds(sdk)
File "C:\Users\Stick\AppData\Roaming\Titanium\mobilesdk\win32\2.0.0.v20120221190136\android\avd.py", line 21, in get_avds
for line in run.run([sdk.get_android(),'list','target'],debug=False).split("\n"):
AttributeError: 'NoneType' object has no attribute 'split'
I have no idea what's missing. Eclipse recognizes everything just fine. ANY suggestions??
P.S.
I've noticed that when I attempt to run 'android' commands, i.e.
android
android list targets
I get what seems to be an error:
The system cannot find the path specified.
However, the commands still continue to run with no issues (I get a list of all the targets and the SDK Manager pops up). I'm not sure whether or not whatever is causing that message is also causing Titanium headaches.

I was facing the exact same issue, but now I have figured this out and it was working fine.
Basically, when I install Titanium Studio and I configure Android SDK it worked fine, but when I try to execute Project there was "javac not found" error. While resolving this issue I came across a Post where it was mentioned to include '%JAVA_HOME;%' in your Path. And when I did this the Android SDK was not longer detected by Titanium.
I removed the '%JAVA_HOME%' from Path Variable and then I include Java bin Folder Path to Path Variable and created a new variable 'JAVA_HOME' which points to root directory of Java installation. Everything works fine after doing this step.
I hope you will now get your Titanium Environment running. :-)
Thanks.

Newer version of Titanium have the Update Android SDK option in the Dashboard. Just make sure, the path is correct. Some cases like mine, there might be two Android SDK paths; one was obsolete and the other was active. So, please make sure of that path. When Titatnium is about to update the SDK software, looking in for newer versions, please select Cancel, as that wouldn't be required!

open titanium ide.
click on file-> titanium mobile project.
a window will show up with a link Set-up/Configure SDKs in the
bottom. click on this link.
now give android sdk home: c:\Androi\android-sdk (or browse to
android-sdk folder in your system)
select the default Android Sdk
click Apply
Click Ok.
You should be good to go.
Let me know if you face any problems.

Related

Can't install Android emulator for IntelliJ on Windows, possibly due to path error

I'm working on a Hello, World Android app using some slightly flaky company-specific tooling built on top of Gradle, along with IntelliJ IDEA. Doing this work on Windows 10, which may be relevant.
The thing about the company-internal tooling is that it automatically installs and provides an Android SDK via a custom Gradle plugin. So both IntelliJ and Gradle are using an Android SDK path provided by our internal tooling.
I'm running into an issue where I can't install an emulator via IntelliJ. Basically when I open the Tools ► Android ► SDK Manager menu item in IntelliJ, the SDK Tools sub-tab in the dialog box is grayed out (circled in the screenshot below). This is where I need to go to install the emulator.
Notice as well in the screenshot below that there is an error message relating to the path to the Android SDK, The Android SDK location is too long. For reference that path comes from our internal tooling, and on my Windows 10 machine, this path is a 204-character string to a valid location on my PC that begins with C:\Users\<my username>\....
In contrast, when I open the equivalent setting in Android Studio directly (note this is using a separate SDK, not the one obtained from the company tooling), I am able to go to the SDK Tools tab and install the emulator.
Would appreciate your help solving this problem, which is ultimately to get the emulator installed. I suspect the The Android SDK location is too long error is related so help getting that fixed would also be appreciated.
My specific IntelliJ idea version is: 2019.2.1, build #IU-192.6262.58.
com/android/tools/idea/npw/PathValidationResult.java has the following code:
if (SystemInfo.isWindows && projectLocation.length() > WINDOWS_PATH_LENGTH_LIMIT) {
return error(PathValidationResult.Message.PATH_TOO_LONG, fieldName);
}
Where WINDOWS_PATH_LENGTH_LIMIT = 100;
The solution is to adjust your tooling so that it uses project and Android SDK paths shorter than 100 characters or switch to Linux/macOS.

Android studio path is not recognized

This is my problem:
What I tried:
Re-installing.
Doing what it tells me to do on the picture.
I added the java jdk to my environment variables.
Nothing of those things worked.
Anyone got a clue?
The problem is not your JDK. As the error says, the problem is that it can't find the Android SDK.
The path that you put into that box should be something like /Users/<user_name>/Library/Android/sdk (OSX) or C:\Android\SDK (Windows), depending on where you have installed the Android SDK.
There are two ways to solve this problem:
Download the android standlone sdk from Android developer site
make a directory consisting of android sdk's in your computer and provide that directory path to that pop up.
Provide the sdk path (the default path is : /opt for Linux based OS and C:\Android\SDK or something like this for windows...
There can be several other ways. You can get more info # Android developer site for details

Android SDK gives wrong path, Android Studio

Recently I've started to get involved in Android developing, and I learned that Android Studio was available contrary to Eclipse. So I downloaded the new software by Google and started it up. It prompted me to install some SDK packages and I did all that it recommended me to do at
http://developer.android.com/tools/help/sdk-manager.html
Then I saw a link that said you can find out where your SDK path is by opening the SDK manager up top, as well as the answer described on this page
Android Studio - How to Change Android SDK Path
So I copied the path and tried to use the run command (I can't post images yet) The path is described as
C:\Users\baruy\AppData\Local\Android\sdk
I get an error saying that it doesn't exist. I browse for the files by myself, to learn that there is no AppData folder under baruy
Windows 8 64-bit, home edition. Please help, thanks
AppData is a hidden folder on windows. In order to show hidden files and folders on windows 8, follow this guide on msdn.
In short, you should go to Control panel->Folder options->"View" tab and then check the "Show hidden files, folders and drives". If you don't find the android sdk after that than it is simply not there.
AppData is an hidden folder. Paste that path in the window manager path and you should get there. Alternatively use the console and type:
cd AppData\Local\Android\sdk
After upgrading to Android 3.0 this path error came up. The default Sdk path in mac is /Users/username/Library/Android/sdk, and as that was marked in the systems settings the studio just had to be restarted and it worked again.

Serious problems in Configuring Android SDK with Eclipse

I am having serious problems in Configuring ADT with Eclipse. I am using Windows 7 Home Premium version.
The Eclipse (64 bit) that I am using is:
Eclipse Classic 3.7.1
Eclipse Java EE IDE for Web Developers.
Version: Indigo Release
Build id: 20110615-0604
Java code runs without any problem in this Eclipse. For running Android:
at first, I went into Eclipse-> Help menu and then Install New Software.
Clicked Add, named it ADT and for location used: http://dl-ssl.google.com/android/eclipse.
The new window that appears, I have clicked all of those boxes and choose Next. Upto this point, everything is OK, ADT is installed and I am be asked to restart Eclipse. When Eclipse launches, a new window appears and asks me to either install the Android Software Development Kit (SDK) or choose an existing SDKs location. I chose to install Android Software Development Kit (SDK) (I checked all the options). I have set SDK location to: C:\My_Workspace\Android_SDK. After everything finishes I see two errors in the Eclipse console:
[2012-01-02 14:29:37 - DDMS] DDMS files not found: C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat
[2012-01-02 14:30:47 - DDMS] DDMS files not found: C:\My_Workspace\Android_SDK\platform-tools\adb.exe C:\My_Workspace\Android_SDK\tools\hprof-conv.exe C:\My_Workspace\Android_SDK\tools\traceview.bat
Note, I have tried to install the SDK at the default location given by Eclipse. But I see the same errors.
If I restart Eclipse an error appears saying:
"Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'".
If I click into Window ->Android SDK manager, I get another error message saying:
"location of the Android SDK has not been setup in the preference."
If I go Window->Preference->Android, I see that, the SDK location is set to "C:\My_Workspace\Android_SDK"
But on top, there is an error message saying, "Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'."
Inside the C:\My_Workspace\Android_SDK\ folder I see only two sub folders:
add-ons
platforms
But there is nothing inside these folders.
Inside "C:\Users\anis_huq.android" folder I see a folder called AVD (contents empty) and file called "ddms".
What is going on? I am confused!
P.S. the post: Could not find folder 'tools' inside SDK does not help my cause.
Problem solved after 1.5 days of work. This is how:
When you get the error:
[2012-01-02 14:29:37 - DDMS] DDMS files not found:
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat
[2012-01-02 14:30:47 - DDMS] DDMS files not found:
C:\My_Workspace\Android_SDK\platform-tools\adb.exe
C:\My_Workspace\Android_SDK\tools\hprof-conv.exe
C:\My_Workspace\Android_SDK\tools\traceview.bat
go to the site: http://developer.android.com/sdk/index.html and download, install;
installer_r16-windows.exe
After the installation, you will still see some errors like:
Fetching
https:// dl-ssl.google.com/android/repository/addons_list-1.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/addons_list-1.xml,
reason: peer not authenticated Fetched Add-ons List successfully
Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated Done loading packages. Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated
The problem is not so evident from the error messages. We figured that, the HTTPS is actually causing the problem. So, start
Android SDK Manager->Tools->Options and now CHECK the box that says:
force https://... sources to be fetched using http://
and then click Packages->Reload.
Everything will be installed as your wish! Now run Eclipse->Window->Preferences->Android and set the location of the newly installed Android SDK (i.e. the location of "android-sdk" folder). And you are ready to go.
1.5 days wasted for this.
Try installing the Android SDK separately first. Then get Eclipse configured appropriately. You might need to run the SDK installer as an administrator in order to have some permissions set up appropriately.
Have you tried downloading ad installing the Android SDK manually, then pointing Eclipse to that location? You will need to run "SDK Manager.exe" to download at least one platform...
Also... Make sure you don't have any spaces in the path to the Android SDK and Eclipse or you might get strange errors.
In the last time I face all the time with such strange errors. The solution in these cases usually is the following.
I guess that you use JDK 7. Android SDK is not compatible with JDK 7. You have to use JDK 6 or JDK 5 (but 5 is too old). Am I right?
Remember the path where you install the android sdk and provide the correct location at window>preferences>android. On my windows 7 system the location is C:\Program Files (x86)\Android\android-sdk. After you provide location in preferences, click apply.
I had this too and just solved it. For me, it turned out that I didn't have all the libraries like the tools package.
Other things to keep in mind that helped me overcome related errors:
1) When giving urls from where to download, if the https doesn't work, try http
2) Run your eclipse as administrator if u r running it from Windows 7 - that will help you avoid permissions problems.

IntelliJ IDEA - Android JDK doesn't work

I've just installed IntelliJ IDEA 10.0.0.2 Community edition
I've installed Android SDK ... (C:\Program Files\Android\android-sdk-windows)
I want to make a new android project, so I a create a new project, select Android Module, next , next...
Then when i need to choose the JDK, I go to the android folder, and when i try to choose it, I get this error:
The selected directory is not a valid
home for JSDK
What am I doing wrong ? what can i do to fix this ?
I Installed android SDK with all the updates
When I choose IntelliJ IDEA Plugin SDK i get:
The selected directory is not a valid
home for IntelliJ IDEA Plugin SDK
EDIT:
Still not solved...
I've already chose the SDK itself and chose android 2.2 Platform when creating the project.
Can't load the JDK files. So i won't me compile, i get this error
Cannot start compiler: the SDK is not
specified for module "blah".
Specify the SDK at Project Structure
dialog.
To develop Android applications in IntelliJ IDEA you need to set both Java SDK (JSDK) and Android SDK:
Configuring Project SDK
Java SDK
Setting Android SDK/Platform
You also need to run SDK Manager application and download Android platforms which you are going to use.
Note that you can detach all the jars from the JSDK configuration in IDEA if you are going to use it only for Android, this will help with the code completion so that only classes available in Android will be suggested by the IDE.
I also recommend to read the following tutorials:
Developing applications for Android in IntelliJ IDEA
Developing Android applications on the base of existing sources
EDIT:
Configuring project's link has been updated
JSDK is the Java SDK. On my Debian it's under /usr/lib/jvm/java-6-sun
My installation path was "C:\Users\User\AppData\Local\Android\android-sdk." That confused IDEA since it doesn't seem to be able to see hidden folders, even when typing in the full path. Bummer...I fixed it though, by setting AppData as visible.
I just wasted a whole lot of time on this problem. My work station is running IntelliJ Ultimate 11 on Windows 7 64-bit. I was setting up my first Android project. Therefore, no SDKs were configured. First I selected the JDK, which was a no-brainer (C:\ProgramFiles (x86)\Java\jdk1.6.0_30). Next comes the part where you need to specify the Android SDK. First you click the elipsis ("...") and then click "Add New". Now here's the kicker... If you look carefully at the dialog box, you'll notice that "Configure new JSDK" is highlighted by default. What you need to do is change the selection to "Android SDK". Now you can select the directory of your Android SDK and you won't get that stupid error message.
I literally wasted about a half an hour before I realized why the app kept telling me "This is not a valid SDK directory." Hopefully this will help someone else having the same problem.
Don here: I had the same trouble in Windows 64 with 11.1.2 and 64bit java. found that only by clicking on the left window could I register my Android SDK.
When you first create Android project/module, you must choose JDK, for this click "+" and select "JSDK" in menu, then select where your Java SDK is, for instance "c:\Program Files\Java\jdk1.6.0_20". Then click "Next" and in "SDK Properties" panel click "New" and select path to your Android SDK (a directory where "SDK Manager.exe" is).
Click the + symbol in the left most pane in the Select android sdk window during the creation of the project and then select the android SDK (default= c/program files/android/android-sdk)
I had a real hard time seeing how to do this on a mac, since you can't download the jdk from sun's site
#Szabolcs Berecz #Yochai On a mac, you'll need to get the source as described here:
or just jump to the download here:
Then it stored in this location:
1.6.x /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/src.jar
If you right click in the leftmost window you can create a new Android Plugin or some such. I was just fighting with this myself. I have never used IntelliJ before and really their docs are out of date. Apparently not up to the current version.
In the JDK part you need to choose the JAVA JDK that was downloaded. (not the android)
C:\Program Files\Java\jdk1.6.0_24\
Make sure you have installed JDK 1.5 or 1.6
(1.7 is not works for some reason with Android SDK).
I had the same problem ("The selected directory is not a valid home for Android SDK"),
but after installing 1.6 JSDK - it`s work for me.
I've got the same problem with version 12 on linux, Android module does not show java sdk location and android sdk location selection fails because java sdk is not set.
I've solved by making a java project, that lets me select java sdk and android sdk (strange right?), after making such a project I can make an android project because android sdk is now configured
I've spent 30 minutes solving a foolish problem
For IntelliJ & Android on Linux.
If the "Android SDK" Menu comes up with a red 'No Android SDK' Click the browse button to the RIGHT of the drop down. - Its a different layout in Linux to Windows.
In my case, I needed to add support for android, so, I searched for android in the plugins settings.
Fixed! I needed to run IntelliJ as Administrator IDEA. Now it will approve my Android SDK directory of "C:\Program Files (x86)\Android\android-sdk"

Categories

Resources