I am trying to use adaptive icon in react native android but it product following error.
AAPT: error: unexpected element found in
here is my manifes.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.anar">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.VIBRATE" />
<application android:name=".MainApplication" android:label="#string/app_name" android:icon="#mipmap/ic_launcher" android:roundIcon="#mipmap/ic_launcher_round" android:allowBackup="false" android:theme="#style/AppTheme">
<activity android:screenOrientation="portrait" android:launchMode="singleTop" android:name=".MainActivity" android:label="#string/app_name" 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" />
<meta-data android:name="com.google.android.geo.API_KEY" android:value="MY_API_KEY_IS_HIDDEN"/>
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
</application>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="#color/ic_launcher_background" />
<foreground android:drawable="#mipmap/ic_launcher_foreground" /> </adaptive-icon>
</manifest>
You have already apply adaptive-icon using android:icon and android:roundIcon. Try to remove those extra code from AndroidManifest.xml
<application
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
...>
<!--<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="#color/ic_launcher_background" />
<foreground android:drawable="#mipmap/ic_launcher_foreground" />
</adaptive-icon> -->
If you check inside ic_launcher_round.xml, you will see those code there, If not then follow below steps to create one:
Create a folder mipmap-anydpi-v26 under res
Create a file ic_launcher_round.xml under mipmap-anydpi-v26
Place below code inside ic_launcher_round.xml
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="#color/ic_launcher_background"/>
<foreground android:drawable="#drawable/ic_launcher_foreground"/>
</adaptive-icon>
Update: I have checked the resources that the site provide, It contains every things, just remove adaptive-icon related code from AndroidManifest.xml and keep in mind that adaptive icon only works from API level 26
Check official documentation for more details
Related
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.my"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="25"
android:targetSdkVersion="33" />
<permission
android:name="com.example.my.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.my.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" />
<application
android:allowBackup="true"
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:dataExtractionRules="#xml/data_extraction_rules"
android:debuggable="true"
android:extractNativeLibs="false"
android:fullBackupContent="#xml/backup_rules"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/Theme.My" >
<activity
android:name="com.example.my.MainActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="com.example.my.androidx-startup"
android:exported="false" >
<meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="androidx.startup" />
<meta-data
android:name="androidx.lifecycle.ProcessLifecycleInitializer"
android:value="androidx.startup" />
</provider>
</application>
</manifest>
I decided to create a light program and nothing starts for about 5 hours, I think. what is the problem? I just started learning Kotlin yesterday.
Errors:
Attribute android:versionCode is not allowed here
Attribute android:versionName is not allowed here
Attribute android:protectionLevel is not allowed here
Attribute android:allowBackup is not allowed here
Attribute android:appComponentFactory is not allowed here
Attribute android:dataExtractionRules is not allowed here
Attribute android:extractNativeLibs is not allowed here
Attribute android:fullBackupContent is not allowed here
Attribute android:icon is not allowed here
Attribute android:supportsRtl is not allowed here
Attribute android:theme is not allowed here
Unresolved class 'InitializationProvider'
Attribute android:exported is not allowed here
simple code that prevents it from running on the phone.
I'm new and don't understand anything. What to do?
For this error - Unresolved class 'InitializationProvider'
Add To use Jetpack Startup in your library or app, add the following to your Gradle file:
dependencies {
implementation("androidx.startup:startup-runtime:1.1.1")
}
Add code in the manifest file ,
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.my"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="25"
android:targetSdkVersion="33" />
<permission
android:name="com.example.my.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.my.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" />
<application
android:allowBackup="true"
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:dataExtractionRules="#xml/data_extraction_rules"
android:debuggable="true"
android:extractNativeLibs="false"
android:fullBackupContent="#xml/backup_rules"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/Theme.My" >
<activity
android:name="com.example.my.MainActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="com.example.my.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="androidx.startup"
tools:node="remove"/>
<meta-data
android:name="androidx.lifecycle.ProcessLifecycleInitializer"
android:value="androidx.startup"
tools:node="remove"/>
</provider>
</application>
</manifest>
Android Studio Does not find the InitializationProvider name class.
You can add this dependency.
implementation "androidx.startup:startup-runtime:1.0.0"
and change your manifest like this
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
tools:node="remove" />
I am trying to use the Google Places API. However, I am always getting errors.
Here is my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.mapthingie">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaKEY" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:replace="android:icon">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaAPIKEY" />
<activityhttps://stackoverflow.com/tags
android:name=".SettingsActivity"
android:label="#string/title_activity_maps">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
In my LogCat, I am getting this error:
PLACES_API_KEY_INVALID
though, as you can see, I am using a valid key. How can I fix this?
I see there are two different keys in Manfiest.xml
try to remove the one inside the application tag.
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaAPIKEY" />
Here is the edited one, copy and paste and try.
If it din't work, renew your API_Key and then replace it .
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.mapthingie">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaKEY" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:replace="android:icon">
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_maps">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
cheers!
When I insert this in AndroidManifest.xml:
<usespermission android:name="android.permission.RECORD_AUDIO"/> <usespermission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
Then I get these errors:
*Error:Element type "uses" must be followed by either attribute specifications, ">" or "/>".
Error:Cannot read packageName from /Users/Money/AndroidStudioProjects/LiFi2/app/src/main/AndroidManifest.xml*
Why?
I tried to put it all kinds of places in this code, but keep getting the same error.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dk.li_fi.lifi2">
<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">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<usespermission android:name="android.permission.RECORD_AUDIO"/>
<usespermission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
</manifest>
The element name is <uses-permission>, not <usespermission>.
Place this before the application tag.
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
I am completely new to Android and have been trying to launch a maps example from the SDK, however, my google play service library when added to workspace gives error in the manifest.xml file. MainActivity>AndroidManifest.xml
I tried changing the properties to Google API 15 and also edited the xml file but it still doesn't work. Any help would be useful, thanks!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mapdemo" android:versionCode="8"
android:versionName="4.0.3">
<!-- Copied from Google Maps Library/AndroidManifest.xml. -->
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- External storage for caching. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- My Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature android:glEsVersion="0x00020000"
android:required="true" />
<!-- End of copy. -->
<application android:icon="#drawable/ic_launcher" <!--Error: No resource found that matches the given name (at 'icon' with value '#drawable/ic_launcher')-->
android:label="#string/demo_title" android:hardwareAccelerated="true"> <!--Error: No resource found that matches the given name (at 'label' with value '#string/basic_map_demo_label')
-->
<!-- ** You need to replace the key below with your own key. ** The example
key below will not be accepted because it is not linked to the certificate
which you will use to sign this application. See: https://developers.google.com/maps/documentation/android/start
for instructions on how to get your own key. -->
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="i_enter_my_key_here" />
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LegalInfoActivity" android:label="#string/legal_info" />
<activity android:name=".BasicMapDemoActivity" android:label="#string/basic_map_demo_label" />
<activity android:name=".CameraDemoActivity" android:label="#string/camera_demo_label" />
<activity android:name=".CircleDemoActivity" android:label="#string/circle_demo_label" />
<activity android:name=".EventsDemoActivity" android:label="#string/events_demo_label" />
<activity android:name=".GroundOverlayDemoActivity"
android:label="#string/ground_overlay_demo_label" />
<activity android:name=".IndoorDemoActivity" android:label="#string/indoor_demo_label" />
<activity android:name=".LayersDemoActivity" android:label="#string/layers_demo_label" />
<activity android:name=".LocationSourceDemoActivity"
android:label="#string/location_source_demo_label" />
<activity android:name=".MapInPagerDemoActivity"
android:label="#string/map_in_pager_demo_label" />
<activity android:name=".MarkerDemoActivity" android:label="#string/marker_demo_label" />
<activity android:name=".MultiMapDemoActivity" android:label="#string/multi_map_demo_label" />
<activity android:name=".MyLocationDemoActivity"
android:label="#string/my_location_demo_label" />
<activity android:name=".OptionsDemoActivity" android:label="#string/options_demo_label" />
<activity android:name=".PolygonDemoActivity" android:label="#string/polygon_demo_label" />
<activity android:name=".PolylineDemoActivity" android:label="#string/polyline_demo_label" />
<activity android:name=".ProgrammaticDemoActivity"
android:label="#string/programmatic_demo_label" />
<activity android:name=".RawMapViewDemoActivity"
android:label="#string/raw_map_view_demo_label" />
<activity android:name=".RetainMapDemoActivity"
android:label="#string/retain_map_demo_label" />
<activity android:name=".SaveStateDemoActivity"
android:label="#string/save_state_demo_label" />
<activity android:name=".SnapshotDemoActivity" android:label="#string/snapshot_demo_label" />
<activity android:name=".SplitStreetViewPanoramaAndMapDemoActivity"
android:label="#string/split_street_view_panorama_and_map_demo_label" />
<activity android:name=".StreetViewPanoramaBasicDemoActivity"
android:label="#string/street_view_panorama_basic_demo_label" />
<activity android:name=".StreetViewPanoramaEventsDemoActivity"
android:label="#string/street_view_panorama_events_demo_label" />
<activity android:name=".StreetViewPanoramaNavigationDemoActivity"
android:label="#string/street_view_panorama_navigation_demo_label" />
<activity android:name=".StreetViewPanoramaOptionsDemoActivity"
android:label="#string/street_view_panorama_options_demo_label" />
<activity android:name=".StreetViewPanoramaViewDemoActivity"
android:label="#string/street_view_panorama_view_demo_label" />
<activity android:name=".TileCoordinate`enter code here`DemoActivity"
android:label="#string/tile_coordinate_demo_label" />
<activity android:name=".TileOverlayDemoActivity"
android:label="#string/tile_overlay_demo_label" />
<activity android:name=".UiSettingsDemoActivity"
android:label="#string/ui_settings_demo_label" />
<activity android:name=".VisibleRegionDemoActivity"
android:label="#string/visible_region_demo_label" />
</application>
</manifest>
Make sure you have a file called ic_launcher in the res/drawable directory. This is usually a png that follows the requirements at Android Iconography. For learning purposes you can just have the ic_launcher in the drawable directory (that you may have to add to your project) with a single icon inside. Later when you get to your actual project you may want different icon sizes as per the specs.
Also make sure you have a string named demo_title in a resource file somewhere. Usually there is a file called, for example "strings.xml" in the res/values directory and inside there is a string declaration:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="demo_title">This is my Demo</string>
</resources>
I have got Eclipse to generate a Basic android Hello World app, But it has 2 errors: first, in my AndroidManifest.xml on these two lines:
I get The markup in the document following the root element must be well formed, Also My R.java Will not generate, no matter how many times I clean my project. Any Answers?
the manifest is here: http://jsfiddle.net/NHDU6/
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jfkingsley.maclogin"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
<!--
Declare the contents of this Android application. The namespace
attribute brings in the Android platform namespace, and the package
supplies a unique name for the application. When writing your
own application, the package name must be changed from "com.example.*"
to come from a domain that you own or have control over.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jfkingsley.maclogin" >
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
<application
android:icon="#drawable/ic_launcher_home"
android:label="#string/home_title" >
<activity
android:name="Home"
android:launchMode="singleInstance"
android:stateNotNeeded="true"
android:theme="#style/Theme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="Wallpaper"
android:icon="#drawable/bg_android_icon"
android:label="Wallpaper" >
<intent-filter>
<action android:name="android.intent.action.SET_WALLPAPER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Thanks, Jonathan
Here is your manifest,
You should not specify more than one Manifest and You should not specify more than one <application> tags.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jfkingsley.maclogin" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
<application
android:icon="#drawable/ic_launcher"
android:label="h" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="Home"
android:launchMode="singleInstance"
android:stateNotNeeded="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="Wallpaper"
android:icon="#drawable/ic_launcher"
android:label="Wallpaper" >
<intent-filter>
<action android:name="android.intent.action.SET_WALLPAPER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
It may be that you are missing something, but sometimes doing a simple re-format of code: CTRL+SHIFT+F, clears the problem.
I looked at your manifest file. The error is caused because you have 2 declarations of <manifest /> tag.
It begins with:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jfkingsley.maclogin"
android:versionCode="1"
android:versionName="1.0" >
Then some comments follow and another declaration starts:
<!--
Declare the contents of this Android application. The namespace
attribute brings in the Android platform namespace, and the package
supplies a unique name for the application. When writing your
own application, the package name must be changed from "com.example.*"
to come from a domain that you own or have control over.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jfkingsley.maclogin" >
<uses-permission android:name="android.permission.CALL_PHONE" />
Your either forgot to comment one of the manifests tag, confused something, or following a wrong tutorial. The AndroidManifest file should have only one <manifest /> tag
The Auto-generated AndroidManifest.xml file has some problem by itself. There is two manifest tag and two uses-sdk tag inside it. That is the problem. Do as follows:
1- Delete the closing tag of first manifest tag which is:
</manifest>
2- Delete definition tag of the second manifest tag which is:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="net.learn2develop.fragments"
android:versionCode="1"
android:versionName="1.0" >
3- If there is two uses-sdk tag, also delete the second uses-sdk tag.
I added a new activity to my app, and it gave this error after. The manifest disappeared from android-studio completely.
I had to edit the manifest with a text editor. It seems that when I added a new activity, Android Studio created a new tag then added the new activity tag inside in the manifest file, rather than just adding the tag with the new activity in the manifest.
After you update the manifest, the project worked fine.
<?xml version="1.0" encoding="utf-8"?>
< xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.groofy">
<activity
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"/>
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main"
android:theme="#style/AppTheme.NoActionBar"/>
<activity
android:name=".SignUp"
android:label="#string/title_activity_sign_up"
android:theme="#style/AppTheme.NoActionBar"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
/> should not be at the end of the file I had the same issue the error means the xml file is not correctly formatted you should try removing the / in front of the > or simply reformat