在清单中注册库活动


<?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="com.fitnesscircle.snapo">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    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>

<activity
    android:name="com.afollestad.materialcamera.CaptureActivity"
    android:label="@string/app_name"
    android:theme="@style/MaterialCamera.CaptureActivity" />
<activity
    android:name="com.afollestad.materialcamera.CaptureActivity2"
    android:theme="@style/MaterialCamera.CaptureActivity" />
<activity
    android:name="com.afollestad.materialcamera.MaterialCamera"
     />

即使我注册它仍然说找不到明确的活动类。我是安卓编码的新手。是我需要更改的任何内容,所以我摆脱了这个活动未发现异常

找不到显式活动类 {com.fitnesscircle.snapo/com.afollestad.materialcamera.CaptureActivity};您是否在 AndroidManifest 中声明了此活动.xml

请帮忙

图书馆活动应在<application> </application>标签内注册

<?xml version="1.0" encoding="utf-8"?>
     <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.fitnesscircle.snapo">
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        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>
        <!-- Register library Activities -->
        <activity
            android:name="com.afollestad.materialcamera.CaptureActivity"
            android:label="@string/app_name"
            android:theme="@style/MaterialCamera.CaptureActivity" />
        <activity
            android:name="com.afollestad.materialcamera.CaptureActivity2"
            android:theme="@style/MaterialCamera.CaptureActivity" />
        <activity
            android:name="com.afollestad.materialcamera.MaterialCamera"
             />
    </application>
</manifest>

相关内容

  • 没有找到相关文章

最新更新