I have imported android support v4 library, in Java it works fine, but when i tried to use it in xml, it gave me Error in an XML file: aborting build. , so i cant do this in my xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<android.support.v4.view.ViewPager android:id="@+id/pager"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</android.support.v4.view.ViewPager>
</LinearLayout>
I tried adding library to build path and many others methods, but i still have problem. Can you help me guys?
Did you make sure to put the jar
in the libs
folder in your project? See this SO post for an explanation: Android: What is the folder name of the jar files (LIB or LIBS)?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.