search

Home  >  Q&A  >  body text

android - 在manifest.xml注册主活动时无法找到activity?

这是manifest代码:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.filepersistencetest">

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

        <activity
            android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>

</application>

</manifest>
这是project目录

请问为什么这里会报错找不到?谢谢!

阿神阿神2772 days ago443

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-17 17:45:40

    In the first screenshot, MainAcitivity is missing a t in the file name

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:45:40

    The file name is wrong
    The second picture is MainAcitivity
    The third picture is MainActivity

    reply
    0
  • Cancelreply