我一直收到一条错误,说在Android Manifest中未声明GalleryActivity?

时间:2017-03-16 15:35:20

标签: android android-manifest

以下是我在Android清单中的声明,错误是未在Android Manifest中声明GalleryActivity。此外,它表示有一个Manifest Merger因多个错误而失败。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.gdick.loginappexercise">
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<activity
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    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=".SignInActivity" />
    <activity android:name=".SignUpActivity" />

    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="@string/google_maps_key" />

    <activity android:name=".TouristMurals" />
    <activity android:name=".HomePageActivity" />


    <meta-data
        android:name="android.support.PARENT_ACTIVITY"
        android:value="com.example.gdick.loginappexercise.HomePageActivity" />




 <activity android:name="com.example.gdick.loginappexercise.GalleryActivity"
        android:label="Gallery" />
    </activity>
</manifest>

这是我的课程。

package com.example.gdick.loginappexercise;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.GridView;

/**
 * Created by Aids on 16/03/2017.
 */

public class GalleryActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gallery);


        GridView gridView = (GridView) findViewById(R.id.gridView);

        gridView.setAdapter(new ImageAdapter(this));

    }

}

0 个答案:

没有答案