I get this compiler error: Cannot resolve symbol 'R'. I know this question may seem familiar but many other questions related to this problem said that the code could compile despite the error while mine doesn't, or that the problem could be solved by cleaning the project and/or restarting Android Studio (I use 0.8.6), while in my case that doesn't work. Import class solves the compiler error but causes my app to crash when I start the activity. The code of the .java containing the error is:
import android.app.Activity;
import android.os.Bundle;
/**
* Created by Me on 16-11-2014.
*/
public class TutorialOne extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tutorial1);
}
}
I have also read that this may be caused by an error in the layout. Therefore I also include the code of the layout, which shows no compiler errors and is a pure pre-made layout:
<?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">
</LinearLayout>
Furthermore, Im following this tutorial: https://www.youtube.com/watch?v=AN5EFviJRR0&list=PLB03EA9545DD188C3&index=10 which uses an old version of Eclipse, can this be causing some kind of problem?
Thanks and sorry if this is still considered a duplicate post
--SOLVED--
Im just stupid and, when creating TutorialOne as class, I accidently created the class in the map java instead of com.something.something.