I downloaded the Android SDK and the Eclipse Plugin and installed them. When I however use the "Open Declaration" in Eclipse on basic Android functions and classes such as setOnClickListener or ListActivity it gives me an "Source not found"-Error.
The total Android source code seems to be 2.1 GB. Where do I get the source code of those functions that I call with the API to integrate it into Eclipse?
Check this issue. There is a lot of links explaining how to do it.
The source code is not included with the sdk. If you wish to debug/use android source you need to download it separately from the sdk. It can be found on google's official site here. This site also contains important information about using their source code that you should read.
Was this helpful?
You can see the source code by installing a plugin in Eclipse: http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/
Related
This may look like a duplicate question, but all the previous answers were too much confusing for a ameature developer like me. I have never used NDK before and I am working with android studio and windows PC. Previous answers(1,2) and other sources are suggesting to use linux to compile. I couldn't understand what to do. Can anyone guide me through the steps about embeding libvlc in my android app
If you are having trouble with compiling vlc , then you can use the following library , thou it is unofficial , but I worked with it and it worked fine .
Unofficial VLC Android SDK
If you're on Windows 10, you should be able to follow the wiki at https://wiki.videolan.org/AndroidCompile/ using WSL (and google/use the videolan forum for what you don't know).
If you don't want to compile, another way could be to download the apk of the official vlc-android app, unzip it, extract the libs you want (namely libvlcjni.so and probably libjniloader.so) and add it to your project (which means making gradle happy).
vlc-android is a fully opensource app that does exactly what you want to do. Feel free to have a look.
Good luck
I have created an Android Application in that I want to implement "Linphone" for voice and video call.
I had download Library project from https://github.com/viv/linphone-android but missing some files in that library.
Can you give me some instruction for getting missing files in Windows OS for Eclipse.
So please provide me some links of complete library code and sample example.
Thanks.
I try to add Raknet to Cocos2d-x game engine for android games but I don't know how .
I couldn't find good tutorial about this integration . I can compile and run both of them separately as well , the problem is integration of them .
I think that I should change my Android.mk .
I see these links and some more but I couldn't find them useful :
http://www.jenkinssoftware.com/forum/index.php?topic=5069.0
http://www.jenkinssoftware.com/forum/index.php?topic=3744.0
The Completest Cocos2d-x Tutorial & Guide List
https://code.google.com/p/fellz/source/browse/trunk/cocos2dx?r=7
my cocos2d-x version: 3.2, raknet : 4.x, ndk : r9d
I use Visual Studio and a document about compiler setup in RakNet tutorials. I followed this doc and finally created a DLL form the Raknet sources, put it next to the my game's .exe file, and it worked well.
You should also add Raknet sources to included header files of Visual Studio.
Update:
RakNet is not the best way; try another way like WebSocket or Socket.io. Socket.io is highly recommended and is already used in cocos2d-x sources, but it's not compatible with socket.io 1.X. You can make some changes to Socketio.h and Socketio.cpp to use it with socket.io version 1.X. Also, cocos2d-x says they will consider this issue in the next releases.
I need to look at the .java files of the android sdk. I have developed applications before but I never needed to look at them so it wasn't a problem then. I saw there is a jar file android.jar that contains all the class files structured but actual sources are not there. git gives various problems to me because I am behind a weird proxy so http://source.android.com/source/using-eclipse.html hasn't been very helpful. What should I do?
EDIT: I'm talking about the java files, just to clarify. And in case you are okay with browsing the code online, Where can I find Android source code online? http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/core/java/android/
Just open the Android SDK Manager and select the Sources for Android SDK of the API level you are trying to support and click Install packages:
(In this case I selected those for SDK v4.3 API-18 and SDK v4.2.2 API-17 but I already have them installed)
If for some reason you SDK manager button doesn't show up on the Eclipse toolbar, follow this recommendations.
To link the source code to Eclipse just follow this instructions; Android Sources are usually under [ANDROID_SDK_FOLDER]/sdk/sources/android-[API_LEVEL]
You can download the ICS sources via the adk manager to your local machine and then attach them to your project in you IDE. See e.g. the blog of Lars Vogel
It is a online latest linux and android source code browsing website.
Android/Linux Source Code Cross Reference
http://hala01.com/
You can browse the .java files of the Android SDK here:
http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android
The links in the other 2 answers, http://hala01.com/ and http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android are no longer working.
You can download and view android SDK source code from this site. As of today in October 2021, source code of up to API level 31 is available.
Since such websites may become unavailable in the future, you may want to download local copies for safe keeping.
I've been using an eclipse plugin that allows me to view android source code for up to android 2.2. I recently cleared my eclipse folder and copied a fresh instance, thereby loosing the plug-in. I don't seem to remember what the plug-in was called and where I installed it from.
I'm not looking for downloading and building the entire source tree of android. This plug-in would allow me to step into android sources when I wanted.
Does anyone have a link to this plug-in location?
You probably mean adt-addons project. The direct link to plugin you're searching is: http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/
In the properties of your android-ver.jar you can set the location of the sources. I think it is enough to download only frameworks project of the AOSP to attach it as a source of a android.jar library.