once i created file called: SettingsActivity.java it appear In every instance in all of my classes where i reference R.id.something the R is in red and it says "cannot resolve symbol R". The project however never fails to build and does work fine. It is just annoying to see this all the time. I have read many other questions on here about something similar but most involved importing projects from eclipse. I am using what i believe to be the most recent version of android studio "0.8.9" and the project was created with android studio and worked without any cannot resolve R problems.
i tryied to delete that file as well the error is gone but after a while it returns back, also i tryied to change Api level to 19 insted of 20 but the same is happening the error disappear instantely and return back. I would like to know what causes this if anyone knows. "butting in your mind that i didn't install all SDK files from the SDK manger".
getting that error in the Gradle Console:
[Fatal Error] :1:2: The markup in the document preceding the root element must be well-formed.
FAILED
FAILURE: Build failed with an exception.
What went wrong: A problem was found with the configuration of task ':app:generateDebugBuildConfig'.
No value has been specified for property 'buildConfigPackageName'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.74 secs
here is AndroidManifest.xml file it looks fine !! :
<?xml version="1.0" encoding="utf-8"?>
   <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.abdal_000.sunshine.app" >
<uses-permission android:name="android.permission.INTERNET" />
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".DetailActivity"
        android:label="@string/title_activity_detail"
        android:parentActivityName=".MainActivity" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.example.abdal_000.sunshine.app.MainActivity" />
    </activity>
</application>
   </manifest>