mBrown
mBrown

Reputation: 1

missing project.properties file error

I'm new to Android development. As I'm learning, I've used a few of the sample projects provided with the Android SDK. I have already had the ApiDemos running on the emulator, but when I went to run it today (now yesterday) I have these 3 errors.

Description

(1) Project has no project.properties file! Edit the project properties to set one.

(2) The project was not built since its build path is incomplete. Cannot find the class >file for java.lang.Object. Fix the build path then try building this project

(3) The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

I have looked in the ApiDemos project folder in my workspace for the project.properties file and it does exist.

Here's what I've tried multiple times... -fix project properties -clean the project -delete the project and re-create it

Please forgive if this seems too simple. I hope it is a simple problem. I'm just overwhelmed by the Eclipse IDE, so maybe your answer could help me understand it better. Thanks in advance.

Upvotes: 0

Views: 6347

Answers (3)

Valerio Santinelli
Valerio Santinelli

Reputation: 1702

If you're using Android Studio you might have noticed that it doesn't create the project.properties file anymore. But sometimes it's needed, especially with CI servers like Jenkins. In that case you can add it running this command in the project's folder:

android update project --path ./src/main/ --target android-19

Where android-19 is the target you specified in your build.gradle file and src/main is the default path for AndroidManifest.xml

Upvotes: 0

Bananeweizen
Bananeweizen

Reputation: 22070

From the context menu on the Android Java project, please use Android Tools->Fix Project Properties.

If that does not help, you can change the settings in the file using a nice dialog by using the context menu again, this time selecting Properties->Android.

Upvotes: 0

Vadym
Vadym

Reputation: 5284

Please check if you have something like

sdk.dir=/Developer/AndroidSDK

in your local.properties file.

Also, by default project.properties file is pretty simple:

# Project target.
target=android-15

Upvotes: 1

Related Questions