question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'app' is an undeclared prefix. In AXML

See original GitHub issue

Steps to reproduce 📜

  1. Copy the axml from the Xamarin Android readme
<com.airbnb.lottie.LottieAnimationView
	android:id="@+id/animation_view"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	app:lottie_fileName="hello-world.json"
	app:lottie_loop="true"
	app:lottie_autoPlay="true" />

Expected behavior 🤔

Tell us what should happen

It should play the animation I’m assuming.

Actual behavior 🐛

Tell us what happens instead

Instead, it says " ‘app’ is an undeclared prefix. Line 36, position 5. "

Configuration 🔧

Version: 2.x

Platform:

  • 🤖 Xamarin.Android

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
MattWhiteProximitycommented, Jul 30, 2018

That makes complete sense! and works! thanks.

1reaction
clovyclovcommented, Jul 30, 2018

@MattWhiteProximity I figured it out. So “app” throws that issue because it’s an undeclared xml namespace. For example, look at your outermost element. See how it shows

xmlns:android="http://schemas.android.com/apk/res/android"

that means you are declaring “android” as a new xml namespace (xmlns). So the same must be done for “app”. So just put this on the outermost layer and you should be set

xmlns:app="http://schemas.android.com/apk/res-auto"

Be sure to clean the solution, delete the bin and obj folders, and rebuild.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Workaround for "undeclared prefix" error on XElement.Load()
My intention is to do this with LINQ-to-XML. However, I get errors when I parse the source: XElement source = XElement.Load(reader);. The ...
Read more >
Undeclared Prefix Error in one sheet - XML
I have an excel file template that is consistently giving me a XML error on one sheet every time it is opened. I've...
Read more >
'app' is an undeclared prefix. In AXML · Issue #177
In XML 'app' is an undeclared prefix. In AXML on Jul 17, 2018 ... that means you are declaring "android" as a new...
Read more >
"'xx' is an undeclared prefix. Line xxxx, position x" error ...
The issue is caused by undeclared namespaces present in your source document(s). Open your file(s) in a text editor and check its syntax....
Read more >
Undeclared namespace prefix "app" (for attribute ... - YouTube
Undeclared namespace prefix " app " (for attribute "actionViewClass") in android studio In this tutorial we are going to solve Undeclared ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found