android - 如何在 list 文件中注册应用程序类?

标签 android xml manifest

如何在我的 android manifest 中注册我的应用程序类?我在网上看了很多教程,仍然不能正确。我的应用程序类称为 Monitor.java。如何在下面的 Manifest 文件代码中注册?

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.project"
    android:versionCode="1"
    android:versionName="1.0" >

<application
    android:allowBackup="true"
    android:debuggable="true"
    android:icon="@drawable/ic_launcher"
    android:label="xyz"
    android:screenOrientation="landscape"
    android:theme="@style/AppTheme" >

    <service
        android:name=".AudioService"
        android:icon="@drawable/ic_launcher"
        android:label="audioservice" >
    </service>

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

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

    <activity
        android:name=".Editor"
        android:screenOrientation="landscape"
        android:windowSoftInputMode="stateHidden" >
        <intent-filter>
            <action android:name="com.example.project.EDITOR" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

</application>

最佳答案

<application
        android:name="package.YourApplicationClass"  <--------
        android:allowBackup="true"
        android:debuggable="true"
        android:icon="@drawable/ic_launcher"
        android:label="xyz"
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme">

关于android - 如何在 list 文件中注册应用程序类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13949666/

相关文章:

java - 使用希伯来字符时出现 MalformedByteSequenceException : Invalid byte 1 of 1-byte UTF-8 sequence.

声明多个域时的 Android applink 消歧对话框

android-studio - 找不到 Android Studio 1.2 : Error:Android Source Generator: [app] AndroidManifest. xml 文件

安卓、gradle 和插件

javascript - Android 播放一次音频

java - Android - 图形显示在 Eclipse 中不工作

java - 构建-impl.xml :1045: The module has not been deployed error

java - 我无法从 .class 目录外部创建工作 .jar

android - RelativeLayout 问题不适合所有屏幕尺寸

android - 如何使用 gson 在 json 现有结构中再插入一项?