2017-08-04 177 views
1

我正嘗試使用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> 

我得到這個錯誤:

回答

0
中,在資源>值的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> 
+0

我做了更改,但仍然有相同的問題 – anu

+0

對不起,我的代碼在這行'android:icon =「@ mipmap/ic_launcher」'有一個錯誤。那麼我在哪裏做出改變? – anu

+0

爲你的應用程序添加一個圖標繪製文件夾,並寫入 android:icon =「@ drawable/your_logo_name」 –

相關問題