I know this question has been answered before but I checked them all and nothing worked.
I have a simple project that cannot resolve the R sign for some reason.
MainActivity Code
public void onCreate(Bundle savedInstanceState)
{ super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
editName = (EditText)findViewById(R.id.editname);
editCode =(EditText)findViewById(R.id.editcode);
bSearch=(Button)findViewById(R.id.bSearch);
}
activity_main File
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:text="Ελληνικά Προϊόντα"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:textSize="20dp"
android:layout_marginBottom="10dp"/>
<TextView android:text="Όνομα"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText android:id="@+id/editname"
android:inputType="number"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView android:text="Κωδικός Προϊόντος"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText android:id="@+id/editcode"
android:inputType="number"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<Button android:id="@+id/bSearch"
android:text="Αναζητηση"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
Android Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.seth.greekproducts" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="GreekProducts"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity android:name=".MainActivity" >
</activity>
</application>
</manifest>
EDIT: at the error console I am getting:
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner.Underlined'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.
and dozens of similar errors.
EDIT: Build.Gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}