android - XML error when compiling -


When I try to compile my app, the XML is reported as an error: "Error: error parsing XML: Not well (invalid token) ". Here is my XML code:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Manifest xmlns: Android = "http://schemas.android.com/apk/res/android" Usage-sdk Android: minSdkVersion = "7" Android: targetSdkVersion = "18" package = "com.example.app1" Android: VersionCode = "1" Android: versionName = "1.0" & gt; & Lt; Use-SDK Android: minSdkVersion = "8" Android: targetSdkVersion = "19" /> & Lt; Android Android: allowBackup = "true" android: icon = "@draubable / IC_Luncher" Android: label = "@ string / app_name" Android: Theme = "@ Style / Aaptim" & gt; & Lt; Activity Android: Name = "Main Activity" Android: label = "@ string / app_name" Android: Theme = "@ Style / Theme. AppCompat.Light" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "DisplayMessageActivity" android: label = "@ string / title_activity_display_message" Android: parentActivityName = "com.example.myfirstapp.MainActivity" & gt; & Lt; Meta-Data Android: name = "android.support.PARENT_ACTIVITY" Android: value = "com.example.myfirstapp.MainActivity" /> & Lt; / Activity & gt; & Lt; / Application & gt; & Lt; / Reveal & gt;  

I tried to remove the compatibility line in my XML, tags have been closed properly. I used that order because I set the compatibility for Android 2.2 or higher. If I want to run for 3.0 and above, will it work properly?

The main problem is the concept of parental activity after API level 16 and your minimum level is 8, so remove

  android: parentActivityName = "com.example.myfirstapp.MainActivity" & gt; & Lt; Meta-Data Android: name = "android.support.PARENT_ACTIVITY" Android: value = "com.example.myfirstapp.MainActivity" />  

and use this alternative.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -