如何在清单文件中注册应用程序类? [英] How to register application class in manifest file?
本文介绍了如何在清单文件中注册应用程序类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在我的Android清单中注册我的应用程序类?我已经看过许多在线教程,但仍然无法正确完成.我的应用程序类称为Monitor.java
.如何在下面的清单文件代码中注册它?
How to register my application class in my android manifest? I have looked at many tutorials online and still can not get it right. My application class is called Monitor.java
. How do I register it in the Manifest file code below?
<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">
这篇关于如何在清单文件中注册应用程序类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文