难道一个Android库需要一个清单,APP_NAME,图标? [英] Does an Android Library need a manifest ,app_name,Icon?

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

问题描述

我有输出AAR库一个Android库。该库建成后将成为移动电视的不同projectFlavors磨损应用。我认为,每个平台'应该是设置变量,如应用程序名称,图标的人,和权限通过清单和productflavors。

I have an android Library that outputs an aar library. This library will be built into different projectFlavors of Mobile, TV and Wear apps. I think that each of these platforms' should be the ones that set variables like the app name, icon, and permissions through the manifest and productflavors.

有没有办法建立一个AAR,而不需要AndroidManifest.xml中,因此可绘制(为图标)?

Is there any way to build an AAR without requiring an AndroidManifest.xml and therefore drawables(for the icon)?

关于我在做什么的更多信息可以在我关于这个问题最后一个问题中找到:
<一href=\"http://stackoverflow.com/questions/28154681/android-studio-java-library-module-vs-android-library-module\">Android工作室Java库模块与Android的库模块

More information about what I'm doing can be found at my last question on the subject: Android Studio Java Library Module vs. Android Library Module

推荐答案

任何Android库需要有一个AndroidManifest.xml文件,但不要求一个名称或图标。当有一个活动是MAIN和它只需发射器。

Any android library needs to have an AndroidManifest.xml file, but a name or an icon is not required. It's only needed when there is an activity that is MAIN and LAUNCHER.

您只需可以使用这个清单和你的图书馆将工作就像一个魅力。

You simply could use this manifest and your library will work like a charm.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="[your package]"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="[min supported version]" />

    <application/>

</manifest>

这篇关于难道一个Android库需要一个清单,APP_NAME,图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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