Skip to main content

Problems importing Android Source Code into Eclipse


Errors on the project build path when using Eclipse
When I debug the framework source using Eclipse, there are some errors on the project build path.
Error messages I saw are the following :
  1. Project 'Android' is missing required library: 'out/target/common/obj/JAVA_LIBRARIES/google-common_intermediates/javalib.jar'
  2. Project 'Android' is missing required library: 'out/target/common/obj/JAVA_LIBRARIES/gsf-client_intermediates/javalib.jar'
Solution:
Goto Project>Properties and libraries section and edit first one to
"out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/javalib.jar" 
and remove second one.

Missing required library when import the android source 4.0 to Eclipse
After this, the build path errors were gone, but I got about 200 errors referring to missing types. This could only be another classpath problem for Eclipse. Here are the extra libraries, that we have to add to the .classpath file:
  1. <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/android-support-v13_intermediates/javalib.jar"/>
  2. <classpathentry kind="lib" path="out/target/common/obj/JAVA_LIBRARIES/filterfw_intermediates/classes-jarjar.jar"/>

or add these two files as externals jars in the above mentioned area, i.e., libraries section in Project>Properties

Hope this solves your problem...

Comments

Popular posts from this blog

Reverse Engineering : Extract contents from .img file

Unyaffs is a program to extract files from a YAFFS2 file system image. Currently it can only extract images created by mkyaffs2image. Download the source from here . Compiling : Extract the contents into a suitable place and run the following command make Usage : unyaffs [options] <image_file_name> [<extract_directory>] Options: -d detection of flash layout, no extraction -b spare contains bad block information -c <chunk size> set chunk size in KByte (default: autodetect, max: 16) -s <spare size> set spare size in Byte (default: autodetect, max: 512) -t list image contents -v verbose output -V print version Source: Official github repository

Mac Yosemite : Ugly turned out to be Uglier and Ugliest

You might have read my review on Mac OSX Yosemite , The Good, bad and ugly. Now it turned out to be UGLIEST. No more words. Here's the image. If you are on Yosemite, you might be familiar with it. Most of the times, you get stuck on boot logo. I've seen complaints regarding it saying that fellow members are ignorant of it and they deny such possibility, even though many are still facing it. Workarounds suggested by our online friends: Just reboot your mac as many times it takes to your desktop. Boot into safe mode, by holding SHIFT and then reboot. Comment your workaround below, mine is the first one. If you are still on Mavericks, be there till Apple provides a fix for this.

Reverse Engineering : Android Dex files to Class files

In my previous post, we have seen how to extract the contents of img file . After extraction, you will find that most of the files have ".dex" extension. These are Compiled Android application code files. In order to convert them into executable format (.class or .jar), you can use dex2jar tool. Extract it to a proper location and open the terminal to this location. Now run the following command: ./d2j-dex2jar.sh <Path-to-dex_file> It will bundle the dex files into a jar file, and stores it in the current directory. dex2jar can also be used to convert dex files into variuos other formats. For detailed info, click here .