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.

unexpected namespace prefix "app" found for tag TextView

See original GitHub issue

IDE: Android Studio 0.8.2

Whenever I use the app:fontPath in a layout in Android Studio, I get a warning “unexpected namespace prefix “app” found for tag TextView.” I’m adding xmlns:app="http://schemas.android.com/apk/res-auto" in my root layout. I have to add tools:ignore=“MissingPrefix” to the view to remove the warning.

screenshot 2014-07-16 11 16 17

I have the following in my values/attr.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <attr name="fontPath" />
</resources>

Edit: To be clear, this does not break anything. It’s just a slight irritant 😀

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:2
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

16reactions
ahrasiscommented, Jan 5, 2017

I think changing TextView to android.support.v7.widget.AppCompatTextView could fix the issue. Can anyone confirm this?

12reactions
death2all110commented, Jul 17, 2014

I’ve always had to add this line under the xmnls:android line, xmlns:tools=" http://schemas.android.com/tools" and then add tools:ignore=“missingPrefix” underneath that. On Jul 17, 2014 6:45 AM, “Gabriel Ittner” notifications@github.com wrote:

When I use it without any prefix I get Attribute is missing the Android namespace prefix. Anything else that I have to do?

— Reply to this email directly or view it on GitHub https://github.com/chrisjenx/Calligraphy/issues/54#issuecomment-49296420 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected namespace prefix "app" found for tag ...
For someone who gets the similar error Unexpected namespace prefix “app” found on textView, you might need to change TextView to ...
Read more >
[Android] unexpected namespace prefix "app" found for tag
Unexpected namespace prefix "app" found for tag TextView less... (Ctrl+F1). Most Android views have attributes in the Android namespace.
Read more >
Android – Unexpected namespace prefix “app” found for tag ...
e.g. I imported layout_toolbar_default.xml and using app:toolbarTitle to specify title . ... This will show error Unexpected namespace prefix "app" found .
Read more >
Android xml error Attribute is missing the Android namespace ...
Attribute is missing the Android namespace prefix. This error is related to one of the XML files in your Android Workspace Project,.
Read more >
Using a non-android namespace prefix in child elements in a ...
add xmlns:tools="http://schemas.android.com/tools" to your root view; add tools:ignore="MissingPrefix" to your text view. On a side note, however, ...
Read more >

github_iconTop Related Medium Post

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