IntelliJ and the android java docs - android

Has anyone had any luck getting IntelliJ to recognize and display the android java docs?

It works out of the box since Android SDK configuration in IDEA automatically adds JavaDoc directory into Documentation Paths.
Make sure you've downloaded the SDK completely including the documentation using the SDK Manager. On my system they are located under SDK_ROOT/docs/reference and this directory is automatically configured in IDEA Android SDK.

Make sure that the directory containing the documentation is in Documentation Paths. For this, do the following:
In Android Studio, open File -> Project Structure
Click on SDKs under Platform Settings
Select Android <version> in the middle panel
Add the following path under the Documentation Paths tab:
path_to_android_sdk/docs/reference
If you have not downloaded the documentation in SDK Manager, please do so before performing this procedure.

Related

Stuck on setup wizard of Android Studio

I am stuck on this screen
Can't perform any further action. Since I already downloaded an SDK, I downloaded this version
Actually android studio try to download all the components of sdk, those which you don't have.
So, it can take a lot time, instead you can disable "Downloading Components" at startup:
Go to the installation directory of Android Studio.
There you will find a folder named "bin".
Inside this folder there is a file named "idea.properties".
Open this file and add the following line to the end of the file:
disable.android.first.run=true
What this will do is disable the check that Android Studio performs on first run and decides to download all that stuff.
If it asks to save the file at some different place instead of overwriting the original one, please check the access permissions to the file.
Hope this will help you.
Remove Android Studio settings dirs for re-run Setup Wizard.
I my case I removed both
C:\Users\bieli\.AndroidStudio4.0
and
C:\Users\bieli\.android
Have you specified custom path to SDK in previous step?? if you do not download the SDK you have to go through custom settings and then specify path to SDK. you are also needed to configure the path to SDK in your environment variables, if you are using window system.
What I found reason for this problem, my SDK was corrupted or damaged. My drive were crashed and I have recovered files by recovering tool, that's why files are get damaged and SDK was not working properly.
Then I redownloaded SDK and its running fine.

Why can't I locate the Android SDK?

Visual studio installation states that the SDK is installed:
However, I cannot find it anywhere. I searched all locations, including this tutorial (there isn't even a folder named Android there). Anyway, any suggestions, what could be the issue? I clearly installed it manually.
Download de SDK(NOT ANDROID STUDIO) Check the Image
Is in the bottom of this LINK
Later just click install and next, next, and you have Android SDK, check where is the folder...

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.

Set local documentation for android studio 0.8

I want to set local documentation path in android studio 0.8, but i cant do this. I google this, but i can't find any solution for this problem. Can any body help me please.
Thanks a lot.
I found the solution in Android Studio 2.1 :
First, you have to see which Android SDK you are using from the Project Structure. Currently I am using Android 7.0 because the problem was caused by Android 7.1.1 SDK (I will explain why).
Now, open the Standalone SDK Manager. Find the SDK version that you use, then select Documentation for Android SDK then Install package and you will have a local copy of the docs automatically used by your AS.
As you can see, there is no documentation available to download for Android 7.1.1, that's why Android Studio was loading it from the Android developer website.
So, the solution is to use an Android SDK that has a downloadable documentation.
I had the same problem.Documentation was empty when I used documentation shortcut(ctrl + Q) and I also couldn't change the documentation paths because it wasn't there! so here is the solution:
Delete C:\Users[user name].AndroidStudioBeta folder.(Don't worry it just delete your configurations! ;) )
rename C:\Program Files (x86)\Android\android-studio\sdk (SDK path)folder to something else.
run Android studio and make sure you don't import you configurations.
Now you can change new sdk folder's name back to SDK .
Android studio will ask you new path for SDK ,so you can continue.
If you have downloaded the documentation using SDK manager, it'll get added automatically when you add an SDK in "Project Structure"
In Android Studio, You can verify this by selecting File -> Project Structure -> SDKs (on left pane).
Select one added SDK from the list, Select the tab "Documentation Paths" from right most pane. Check whether the path is automatically added. If not, add it manually by clicking the plus (+) button on right.
The only way I could accomplish this on AS 1.0 is to run local web server (Abyss Web Server) to host the documentation from here (C:\Program Files (x86)\Android\sdk\docs). And use Fiddler as proxy to remap url developer.android.com to 127.0.0.1:8080 (Abyss address), setting Fiddler's address as proxy in AS settings.
Oh, and created a .bat file to run and stop this all together.
Really dirty trick, but the only I found.

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