【问题标题】:Error on adding android module dependency添加android模块依赖时出错
【发布时间】:2016-07-16 02:57:48
【问题描述】:

gradle build 后出现此错误:

RuntimeException:无法读取清单数据:活动名称无法 为空。

从这里获得帮助:

http://www.vogella.com/tutorials/AndroidLibraryProjects/article.html

http://marker.to/Ltdy79

但我有我的活动名称:

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

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

</manifest>

【问题讨论】:

    标签: android android-studio android-gradle-plugin build.gradle android-library


    【解决方案1】:

    您尚未在androidmanifest.xml 中为您的一项活动指定名称。输入一个名字,你应该很好。

    【讨论】:

    • 我的库仅包含两个简单的类文件,我的应用程序包含清单中已经提到的主要活动。
    猜你喜欢
    • 2016-02-19
    • 2016-09-11
    • 2014-12-27
    • 2016-09-11
    • 1970-01-01
    • 2015-12-09
    • 2016-12-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多