這些是運行我的應用程序啓動屏幕時彈出的錯誤。錯誤:無法從app/src/main/AndroidManifest.xml讀取packageName
Error:The markup in the document preceding the root element must be well-formed.
Error:Cannot read packageName from /Users/akellavamsimeher/AndroidStudioProjects/WILM/app/src/main/AndroidManifest.xml
我試着解決看到來自stackoverflow的帖子,但我仍然堅持在那。請幫我解決這些錯誤。
這是代碼。
<?xml version="1.0" encoding="utf-8"?>
< manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pratyuvamgmail.wilm">
<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"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
android:name="com.pratyuvamgmail.wilm.Splash" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action
android:name="com.coderefer.androidsplashscreenexample.MAINACTIVITY"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
下面是我的代碼...
<?xml version="1.0" encoding="utf-8"?>
< manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pratyuvamgmail.wilm">
<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"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
android:name="com.pratyuvamgmail.wilm.Splash" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.coderefer.androidsplashscreenexample.MAINACTIVITY"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
分享你的AndroidManifest文件,讓你的AndroidManifest.xml文件開頭: –
W0rmH0le
那麼是代碼? – Apostolos
可能重複的[無法從AndroidManifest.xml讀取packageName](http://stackoverflow.com/questions/32447683/cannot-read-packagename-from-androidmanifest-xml) – Benny