Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to build Android project using Facebook SDK against Android 2.2 (Froyo)

I've recently started getting into programming with the Facebook SDK for Android, which I used to write a basic sample app. I want it to be able to run on as many systems as possible, so I set the build target to Android 2.2 (Froyo/API level 8). However, this results in the following error:

Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 8   FacebookTestApp

In comparison, all of the sample apps that came with the Facebook SDK have their build target set to Android 2.2, and none of them have this problem. Anyone know what I might be doing wrong?

Thanks.

like image 963
Danny Avatar asked Mar 21 '14 06:03

Danny


3 Answers

I had the same problem today, this is how I fixed it:

Righ click on your project > properties > Java compiler > enable "project specific settings" Set Compiler compliance level to 1.6 re Build your project

Voila!

like image 174
Josh Avatar answered Oct 01 '22 16:10

Josh


Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 8

Here is the solution:

Right click your project -> Properties -> Android -> Select the lasted Project Build Target

This is what worked for me.

like image 21
Simon Mokhele Avatar answered Oct 01 '22 16:10

Simon Mokhele


Right click on your project > Android Tools > Fix Project Properties.

Refresh the project and clean+build it.

like image 40
Sagar Waghmare Avatar answered Oct 01 '22 14:10

Sagar Waghmare