AndroidManifest.xml文件错误
问题描述:
我正尝试使用Android Studio生成我的应用程序'ChristmasTree'的apk。我遇到了AndroidManifest文件的问题。AndroidManifest.xml文件错误
AndroidManifest.xml中
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.christmastree"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/ChristmasTree"
android:icon="@drawable/ic_launcher"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/ChristmasTree"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"
/>
</application>
</manifest>
我得到这个错误:
答
中,在资源>值的string.xml文件
- >的strings.xml文件夹添加此线。
<string name="ChristmasTree">ChristmasTree</string>
,并添加资源 - >绘制添加文件夹和图标为您的应用程序并将其命名为
ic_launcher.
和资源添加 - >值 - > Style.xml文件
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
我做了更改,但仍然有相同的问题 – anu
对不起,我的代码在这行'android:icon =“@ mipmap/ic_launcher”'有一个错误。那么我在哪里做出改变? – anu
为你的应用程序添加一个图标绘制文件夹,并写入 android:icon =“@ drawable/your_logo_name” –