First I know that this probably sounds like it isn’t the best way to do this but changing the overall design is out of my control so please don’t post answers to do it a different way. I have a plain Java project that I am linking to my Android application. I need to use some Android stuff inside the Java project so I just linked to the android.jar file. This worked fine for using the Android library until I try to compile which complains about not having a default.properties file. I tried adding the default.properties file to the root of the project but the problem is still there. Any help on this would be great.
Thanks
I do the exact same thing – I have a Java project in Eclipse that I use to provide some common code to all my apps (although I’m moving to an Android library project).
The only reason you’d need to use the properties is if you’re mistakenly using the Android pre and post compilers.
If you’ve created a pure java project this should just work, here are the the definition files for mine:
.project
and .classpath
You can then either use the project as a dependency for other projects or compile it to a jar file to import.
I can’t imagine you’re actually having problems compiling the plain java project (if it’s really plain java) as the stubs will work perfectly to compile against – so is the problem in the Android project that is linking against the Java project?
Try creating a new Android project from scratch, make sure it works and then link it against the java project – there’s no reason it shouldn’t work.