开发者

I've an exception when run android application?

I think the error is from this manifest file ?!! when i want to start this activity "SearchResultForm" i have the exception ??

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="ayanoo.forms"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/search" android:label="@string/app_name">
        <activity android:name=".MainActivity"  android:label="@string/app_name" android:launchMode="standard">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    <activi开发者_Go百科ty android:name="PersonDataForm" android:label="@layout/person_data_form"></activity>
    <activity android:name="SearchResultForm" android:theme="@style/CodeFont"></activity>
    <activity android:name="SendMessageForm" android:theme="@style/CodeFont"></activity>


</application>
    <uses-sdk android:minSdkVersion="3" />

<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>

</manifest> 


You should have every activity of your appliaction listed within manifest file, like this:

<application android:icon="@drawable/ok" android:label="Application name">
        <activity android:name=".main_screen.MyActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
</application>


Your manifest has wrong links to your Activities (except the MainActivity).

You have:

<activity android:name="SearchResultForm" android:theme="@style/CodeFont"></activity>

Try to use:

<activity android:name=".SearchResultForm" android:theme="@style/CodeFont"></activity>

Pay attention to the dot.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜