Problems with javadoc - android

When I start a new android project and use native android methods and components and java methods and components, I can't read their description because javadoc send me this message:
Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc.
I have the latest android documentation in my android-sdk folder and javadoc works when I work with standard java projects, but not with android project. Have you got any ideas why does it happen and how can I fix this issue?

I found solution myself. In this situation you need to correct a path of your javadoc at Project->Properties->Java Build path->AndroidX.X(where X.X is platform version)->android.jar->Javadoc location.
It should be pointed at your docs\reference location

If you are using Eclipse (you should mention the IDE) you should get a button to "attach source" when you get that message. Just click that button and point it to the docs directory on your computer or on the internet and you should be good to go.

Kindly check the following url & try to implement the instructions provided
http://stuffthathappens.com/blog/2008/11/01/browsing-android-source-in-eclipse/

Related

Project 'HelloFacebookSample' is missing required Java project 'facebook'

I have been following the instructions for integrating the facebook SDK into my apps. I have succeeded in getting all the given sample apps to compile and run except for "helloFacebookSample". For this I get a compilation error:
Project 'HelloFacebookSample' is missing required Java project 'facebook'
My understanding of projects/libraries/build paths etc is a little hazy, but I can not work out why this should fail where all the others succeeded.
Here's a screen grab of my properties window for HelloFacebookSample:
I can confirm that the directory:
c:\android stuff\facebook\facebook-android-sdk-3.0\facebook\bin
contains a file facebooksdk.jar
Any ideas?
EDIT: Thrashing around some more, I just clicked on the "projects" tab that you see in the screen grab above, and saw that it says "facebook (missing)". I'm a bit confused because I thought that projects may need to rely on libraries rather than other projects... but still I have no idea how to resolve the problem. I don't seem to have a project called simply "facebook"...
Edit: thrashing around some more, I just experimentally deleted the "facebook (missing)" from the java build path and then did an "add" of "FacebookSDK"... I thought this was cluttching at straws, but to my surprise it worked!!! HelloFacebookSample compiled and ran!!! - I have no idea what's going on though and would still like an explanation.
The previous version of the Android Facebook SDK referred to the project as 'facebook'. It looks like this sample was not updated to delete the old reference, and add the new one to 'FacebookSDK'. You took the corrective steps to resolve this yourself already by modifying the Java Build Path of the project.
The problem will easily be removed by simply going to the properties of your project and right clicking it, then go to project tab, select the project which prompts missing and remove it.
Now click on project->build project->clean
Now run your project and it will surely do fine

Could not find Facebook SDK.apk

Hey I know this was asked before, but none of the solutions seem to help.
This is NOT a duplicate
I have used the Facebook SDK before on an earlier project,
now I started a new one and I get this weird error.
I have set a reference to the library
I have set the Facebook SDK project as a library
I have tried deleting it and re-adding it according to the official documentation, and basically tried everything in this question.
Though I still get this error and can't find out why.
Worth to mention, when I tried to use the facebook class, it gave me an error with an option of "fix project", which I did and still didn't work, might be related?
This is common error. Just remove FacebookSDK project from Properties->Java Build Path->Projects . This project should be referenced from Properties->Android
For more information, see this answer: Could not find Library.apk!
Well, after alot of searches the only thing that worked for me is just creating a new project and copying all the files to it.
I tried avoiding it but that seems like the only thing that works =/
As there is no answer on this topic whatsoever, so if someone could find out a better solution - it will be very helpfull to the community
Hmm.. I just want to ask whether did you import the Facebook SDK into Eclipse itself? Because I had did a project using Facebook and the thing is that besides referencing, the guide I followed actually instructed that the SDK must be imported into the Eclipse.
You might probably want to have a look at this. Else, the other way is just like what you did, copying all the files.
Try deleting the Facebook application for Android (if you have one installed on your phone). This worked for me.
i dont know how this is happened but it works :
first : i have added all facebook3.0 related sample + facebookSDk projects in one workspace .
second : i have run a sample project . in which i found a .jar file :
androiddependencies->facebooksdk.jar (note this exact path )
third :
1.) i created my project .
2.) inside this i have removed errors by :- FixProjectSetup (atLast position )
3.) i have added facebooksdk.jar by right_clicking at project->properties->android->by checking android 4.2 + reference the Facebooksdk -> done .
now i am able to create and run programs easily .

Link to droid fu jar or help installing it?

Does anyone know where you can get the droid fu jar from? I have no idea how to install it from github
Read the Droid-Fu documentation, specifically the "How do I install it?" section, which explains, step by step, precisely how to build a JAR for your use.
If you do not understand those instructions, please contact the developer, or simply do not use the library.
Also, please do not ask duplicate questions.
Is this library? Can you download it? If you can download it, Right click on the project -> Build Path -> Configure Build Path -> Select the Libraries Tab -> Add external JAR -> Browse you jar and add it. Now import the library.
Not sure why its at java2s but http://www.java2s.com/Code/Jar/d/Downloaddroidfu10jar.htm appears to be the correct jar. I've used it just to see if it works and it does.
For some general explanation regarding Droid-Fu: see this post
Also, look at ignition now, as Droid-Fu is discontinued.

Eclipse dont have java doc to show information about class and methods. how to attach those? +android

I'm
working on android under eclipse holies environment. but my eclipse not helping me to find detail about class or method while writing code.
Ex: Toast android.widget.Toast.makeText(Context context, CharSequence text, int duration)
if i mouse hover on makeText() in above statement, getting following information
Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc
where and what do i need to attach?
If you have installed the ADT plugin to Eclipse then you should make sure that you download the package called something along the lines of "Documentation for Android SDK 2.2,
API 8, revision 1" or whatever. Have you gone through the entire installation guide for the Android SDK as posted on the official website? http://developer.android.com/sdk/installing.html this is the one I'm talking about. It's been discussed on SO before as well: JavaDoc in an Eclipse Android Project
If you have done all this, then http://www.vogella.de/articles/Eclipse/article.html#classpath_jarjavadoc does a good job of explaining how to add Sources & Javadocs to existing Libraries in case something went wrong.
For example, this is how my Libraries path looks:
Go check and see how yours looks. Included is the location for the Javadocs normally (SDK Path/docs/reference/)
If you want to add the source code as well, see:
http://android.opensourceror.org/2010/01/18/android-source/
&
http://stuffthathappens.com/blog/2008/11/01/browsing-android-source-in-eclipse/

How to add javadoc for android to Netbeans

I just started using Net Beans. I am wanting to try my hand at developing android apps. I got the android sdk downloaded and everything is working well. I can create little apps and run them in the emulator. However, the intelisense popup for the android methods says that the Javadoc isn't found. Is there a way to add it?
The best way as below steps in NetBeans 7:
Tools --> Ant Libraries.
New library --> Name it Android.
Classpath --> Add JAR/Folder --> {SDK Folder}\platforms\android-16\android.jar
(in short find android.jar and use it's path, for me I'm using 16 version).
Javadoc --> Add ZIP/Folder --> {SDK Folder}\docs\references
(important note: you may get error in above step, so search will not work. To solve it, copy the file index.html inside [references folder] to a new file and called index-all.html. Then re-add the path in step 4).
Source: Here
Take a look at the Android Sources provided by adt-addons. This eclipse plugin will download all of the sources and attach them automatically.
If you aren't using Eclipse, you can still download the source zips from the jar at http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/plugins/
Extract the jar file and inside you'll find source zips for each platform revision. Attach these to your IDE.
Otherwise, you can check out the sources manually from git but this is a rather lengthy and arduous process to achieve the above.
You can download various javadocs from
http://www.jarvana.com/jarvana/browse/com/google/android/android/2.3.3/
Just drop the javadocs jar files to android-sdk-{macosx,windows,linux}/docs
Not sure what your setup is like, but the JavaDoc is stored in /docs/reference
For my setup I had to create a zip of that folder and add it as JavaDoc to the Android library.
If you use the nbandroidsupport plugin you can download the javadoc from Android SDK Manager, you can found the package in the latest android's API (in my case Android 5.1.1) the name of package is "Documentation for Android SDK".
Once you have installed the package restart your netbeans. In my case the javadoc is not showing sometimes pressing ctrl+space on the method therefore you can show the javadoc pressing ctrl+shift+space.
Note: this method applies to any API version.

Categories

Resources