Android的库项目的清单文件 [英] android library project manifest file

查看:276
本文介绍了Android的库项目的清单文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图整合待办事项应用程序,它是开源的到我的主要的应用程序。我所做的待办事项应用程序作为库项目和集成的manifest.xml如手册中获悉...但我面对的一个问题。

I am trying to integrate a todo app which is open source into my main app. I have made the todo app as a library project and integrated the manifest.xml as informed in the manual...but I am facing one issue.

在我的库项目manifest文件就开始

In my library project manifest file it start with

<application android:name=".TodoApplication" android:icon="@drawable/todotxt_touch_icon" >

我怎样才能融入到这一点我的主要manifest文件,因为我已经有一个应用程序的名字......我已经将库项目的活动,但我无法这一行整合,这是不是因为那个工作...

How can I integrate this into my main manifest file because I already have an application name...I have integrated activities of the library project but I am unable to integrate this line and it is not working because of that....

请找到库项目的manifest.xml:

Please find manifest.xml of the library project:

    <?xml version="1.0" encoding="utf-8"?>

<manifest package="com.todotxt.todotxttouch"
    android:versionName="0.7" android:versionCode="21"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- Warning 'is lower than the project target API level' should be ok -->

    <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application android:name=".TodoApplication" android:icon="@drawable/todotxt_touch_icon"
        android:label="@string/app_label" android:debuggable="true">

        <uses-configuration></uses-configuration>
        <supports-screens android:largeScreens="true"
            android:normalScreens="true" android:smallScreens="true"
            android:resizeable="true" android:anyDensity="true" />

        <activity android:name=".LoginScreen" android:label="@string/app_label"
            android:theme="@android:style/Theme.NoTitleBar"
            android:configChanges="keyboardHidden|orientation">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name=".Filter" android:label="Filter"
            android:theme="@android:style/Theme.NoTitleBar" />
        <activity android:name=".Preferences" android:label="@string/set_preferences" />
        <activity android:name=".AddTask" android:label="@string/addtask"
            android:theme="@android:style/Theme.NoTitleBar"
            android:configChanges="orientation|keyboardHidden"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
        </activity>

        <activity-alias android:name=".AddTaskShortcut"
            android:targetActivity=".AddTask" android:label="@string/shortcut_addtask_name">
            <intent-filter>
                <action android:name="android.intent.action.CREATE_SHORTCUT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity-alias>
        <activity-alias android:name=".AddTaskShare"
            android:targetActivity=".AddTask" android:label="@string/share_addtask_name">
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="text/plain" />
            </intent-filter>
        </activity-alias>
        <activity android:name=".HelpActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
        <activity android:name=".TodoTxtTouch" android:theme="@android:style/Theme.NoTitleBar"
            android:configChanges="keyboardHidden|orientation">
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
            <meta-data android:name="android.app.searchable"
                android:resource="@xml/searchable" />
        </activity>

        <!-- Task list widget -->
        <receiver android:name=".TodoWidgetProvider" android:label="@string/app_label">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.todotxt.todotxttouch.APPWIDGET_UPDATE"/>
            </intent-filter>
            <meta-data android:name="android.appwidget.provider" android:resource="@xml/todo_widget_provider" />
        </receiver>

    </application>

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>

</manifest> 

我在哪里卡住与应用程序名称一部分的主要部分....我怎么能在我的主要的应用程序集成库项目的应用程序名称清单,因为它已经有一个应用程序的名字......所以我被陷在这部分并没有因为只有它抛出运行时错误的工作....

The main part where I am stuck is with the application name part....how can I integrate the library project application name in my main app manifest because it already has a application name...so I am getting stuck in that part and it is not working because of that only as it throws run time error....

我在我的主要的应用程序清单文件我的综合库项目的所有活动与他们的完整的包名。任何人都可以指导我在哪里,我错了......

I have integrated all activities of my library project with their full package name in my main app manifest files. anyone can guide me where I am going wrong...

推荐答案

据我所知,整合的库项目不需要改变你的清单。只要创建自己的项目,并打开您想在一个单独的项目,包括项目。

From what I know, integrating a library project doesn't require to change your manifest. Just create your own project, and open the project you want to include in a seperate project.

在Eclilpse,你可以右键点击你的项目,选择型属性,检查:图书馆项目。在自己的项目,你必须去生成属性,并在项目选项卡添加的Todo应用程序在那里。这样一来,待办事项应用程序是,当你建立你自己的应用程序以及建立。

In Eclilpse, you can right click your project, go to properites, and check: Library-project. In your own project, you must go to the build properties, and in the project-tab add your Todo Application there. This way, the Todo app is build when you build your own app as well.

编辑(基于评论):
你可以声明要在你的清单使用的活动。
应用程序的名称,是不是在你的清单要求。

EDIT (based on comments) : You can declare the activities that you want to use in your manifest. The Application name, is not required in your Manifest.

这篇关于Android的库项目的清单文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆