Hi, I'm a newbie in Android Programming. I'm going to import project maybe made from Eclipse Android to Android Studio, but I encounter an error:
Invalid XML file: D:\AndroidManifest.xml:
Content is not allowed in prolog.
The contents of AndroidManifest.xml is:
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Wifi Connector
*
* Copyright (c) 2011 Kevin Yuan (farproc@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
**/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.farproc.wifi.connecter"
android:versionCode="15"
android:versionName="2.0.2"
android:installLocation="auto">
<uses-sdk
android:minSdkVersion="3"
android:targetSdkVersion="14"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<application android:icon="@drawable/icon"
android:label="@String/app_name" >
<!--
<activity android:name=".TestWifiScan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
-->
<activity android:name="MainActivity"
android:theme="@Style/PlatformDialog"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:noHistory="true">
<intent-filter>
<category android:name="android.intent.category.INFO" />
</intent-filter>
<intent-filter>
<action android:name="com.farproc.wifi.connecter.action.CONNECT_OR_EDIT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service android:name="ReenableAllApsWhenNetworkStateChanged$BackgroundService"/>
</application>
</manifest>
How can I fix this? Thanks.
Invalid XML file: D:\AndroidManifest.xml:
Content is not allowed in prolog.
The contents of AndroidManifest.xml is:
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Wifi Connector
*
* Copyright (c) 2011 Kevin Yuan (farproc@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
**/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.farproc.wifi.connecter"
android:versionCode="15"
android:versionName="2.0.2"
android:installLocation="auto">
<uses-sdk
android:minSdkVersion="3"
android:targetSdkVersion="14"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<application android:icon="@drawable/icon"
android:label="@String/app_name" >
<!--
<activity android:name=".TestWifiScan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
-->
<activity android:name="MainActivity"
android:theme="@Style/PlatformDialog"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:noHistory="true">
<intent-filter>
<category android:name="android.intent.category.INFO" />
</intent-filter>
<intent-filter>
<action android:name="com.farproc.wifi.connecter.action.CONNECT_OR_EDIT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service android:name="ReenableAllApsWhenNetworkStateChanged$BackgroundService"/>
</application>
</manifest>
How can I fix this? Thanks.