Reputation: 41
I am trying to open my project in Android Studio , but i get this error : Content is not allowed in prolog. My code is this :
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp.mobile" platformBuildVersionCode="8" platformBuildVersionName="2.2">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<application android:allowBackup="true" android:icon="@drawable/icon" android:label="@string/app_name" android:screenOrientation="portrait" android:theme="@android:style/Theme.Light.NoTitleBar">
<activity android:label="myapp" android:name="com.myapp.mobile.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:label="@string/app_name" android:name="com.myapp.mobile.Main">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name="com.myapp.mobile.ChooseMenu"/>
<activity android:name="com.myapp.mobile.LocalMenu"/>
<activity android:name="com.myapp.mobile.LocalMenuProducts"/>
<activity android:name="com.myapp.mobile.Cart"/>
<activity android:name="com.myapp.mobile.FinishOrder"/>
<activity android:name="com.myapp.mobile.ReserveTable"/>
</application>
I had myapp.apk and decompiled using Android Decompiler
Upvotes: 0
Views: 763
Reputation: 111716
You have two XML declarations in your file:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml version="1.0" encoding="utf-8"?>
Delete one. There may only be at most one XML declaration in a file, and it can only appear at the very top.
See also: Are multiple XML declarations in a document well-formed XML?
Upvotes: 1
Reputation: 1895
Do you have typo here (myaspp)
<activity android:label="myapp" android:name="com.myaspp.Splash">
and the intention was
<activity android:label="myapp" android:name="com.myapp.Splash">
Upvotes: 1
Reputation:
You may wanna check all your XML files manifest + layouts (by copying them into Notepad++ or whatever) and see if there's any special characters like this one � and remove them.
Upvotes: 1