Error parsing XML: unbound prefix on library

前端 未结 6 2254
感情败类
感情败类 2021-02-19 01:56

I am using three libraries in my project:

a. ViewPager
b. SherlockActionBar
c. PagerSlidingTabStrip

In my layout xml, I am getting the followin

6条回答
  •  离开以前
    2021-02-19 02:32

    I didn't have a LinearLayout as my root XML element.
    I had an android.support.v4.view.ViewPager instead because I was using the AppCompat Library.

    So, this was what I did:
    ** I included the tools:context=".classname" line and that's where the Error parsing XML: unbound prefix comes from (in part). It's brought about when you referrence a path that Eclipse/Studio can't see when it's building your xml layout.

    Solution:
    I added the xmlns:tools="http://schemas.android.com/tools" to point ADT to my tools location, and we were good to go!

    FINAL CODE:

    
    

提交回复
热议问题