I had an application that was created using Eclipse 3.5 and used java projects instead of correctly created Android library projects. I'm not sure how it worked (the application was published and fined), but I could not get it to work when I tried to set up the development environment on another machine. I keep getting ClassNotFoundExceptions for references to a Java project.
Since I had a couple of years of registration history, I really did not want to translate the projects, as some of the answers claim. For me, converting a Java project to a proper Android library made more sense.
Here are the steps I had to take to get it working:
Add AndroidNature to .project file
<natures> <nature>com.android.ide.eclipse.adt.AndroidNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures>
Add a simple "AndroidManfest.xml"
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.convertproject.test" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15" /> </manifest>
Add file "project.properties"
target=android-7 android.library=true
- Create an empty folder from the project root for the called: "res"
- Update in Eclipse
- Right-click on the project, select "Android Tools", "Fix Project Properties" Rebuild
NOTE: when you add the library to your main project, import using the Android / Libray tab (in the project properties) instead of the Java Build Path / Projects
raider33 Aug 24 2018-12-12T00: 00Z
source share