i'm can't found the solution :(

+1 raneem nusairat · April 9, 2015
hi 

i'm write simple code in MainActivity.java : 

public class MainActivity extends Activity
{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main_activity);
    }
}

and in manifests there's an error :

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="net.raneem.test1">

    <application android:allowBackup="true" android:label="@string/app_name"
        android:icon="@mipmap/ic_launcher" android:theme="@style/AppTheme">

        <activity android:name=".MainActivity"        //HERE "Cannot resolve symbol "MainActivity"
            android:label="Test 1">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.launcher"/>
            </intent-filter>

        </activity>

    </application>

</manifest>



help me to find the solution . 

Post a Reply

Replies

Oldest  Newest  Rating
0 Dol Lod · April 9, 2015
In your manifest change  <activity android:name=".MainActivity" //HERE "Cannot resolve symbol "MainActivity"

android:label="Test 1">

to 

<activity android:name="android:name="net.raneem.test1.MainActivity" //HERE "Cannot resolve symbol "MainActivity"

android:label="Test 1">

That might work because it uses absolute paths instead of relative paths. I had something similar to this error once too and that was what resolved it. 
  • 1

Java / Android Development

107,220 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator