Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap 2.1 for Android - Hello World App 3 errors at launch

I developed something with Phonegap for iOS, but this is my first trial for Android.

I created my hello world application with CLI sth like this mentioned here:

$ /path/to/cordova-android/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName

Even though I created this app in Eclipse Workspace, I needed to import it to Eclipse. I created two AVDs. One for API level 8, one for API level 16.

When I try to build, it gives me these three errors and a warning. What is wrong with my setup?

Description Resource    Path    Location    Type
error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android'    AndroidManifest.xml /com.example.test.testprojectname   line 20 Android AAPT Problem
error: No resource identifier found for attribute 'xlargeScreens' in package 'android'  AndroidManifest.xml /com.example.test.testprojectname   line 22 Android AAPT Problem
error: Error: String types not allowed (at 'configChanges' with value 'orientation|keyboardHidden|keyboard|screenSize|locale'). AndroidManifest.xml /com.example.test.testprojectname   line 51 Android AAPT Problem
The import android.app.Activity is never used   testprojectname.java    /com.example.test.testprojectname/src/com/example/test  line 22 Java Problem
like image 601
noway Avatar asked Oct 23 '12 22:10

noway


Video Answer


1 Answers

Go to Project -> Properties -> Android and select a newer SDK (preferably the latest one), after that run Project -> Clean. That worked for me.

like image 66
tkit Avatar answered Nov 16 '22 02:11

tkit