Just started development for android and now i have an error as soon as i create a new project which says R Cannot be resolved to a variable
- I tried rebuilding
- I tried setting paths
- I checked XML and Manifest
- The R.java file doesnt exists
here's the java file of the activity
package com.pingcampus.pc;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class Startingpoint extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.startingpoint);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.startingpoint, menu);
return true;
}
}
and here's the manifest of the application:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pingcampus.pc"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.pingcampus.pc.Startingpoint"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Also as someone demanded .. Here's the XML(activity) code as well
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Startingpoint" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</RelativeLayout>
CONSOLE ERRORS (AFTER RESTARTING ECLIPSE)
[2013-06-20 19:06:12 - Pingcampus] 'default' is not a best match for any device/locale combination.
[2013-06-20 19:06:12 - Pingcampus] Displaying it with ', , Locale Language ___Region __, , sw320dp, w320dp, h533dp, Normal Screen, Long screen aspect ratio, Portrait Orientation, Normal, Day time, High Density, Finger-based touchscreen, Soft keyboard, No keyboard, Hidden navigation, No navigation, Screen resolution 800x480, API Level 17' which is compatible, but will actually be displayed with another more specific version of the layout.
help!
HERE'S A SCREEN SHOT OF THE WINDOW