How to import open-source projects to android, which often leads to compilation errors

Source: Internet
Author: User


How to import open-source projects to android, which often leads to compilation errors

1. Tip: find two V4 packages of different versions.

Solution: 1) Delete the V4 package under the libs directory of the project.

2) copy the path to overwrite the V4 package copy paste of the earlier version.

650) this. length = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/101Z13c2-0.jpg "title =" qqpicture 20130907141458.jpg "width =" 800 "height =" 189 "border =" 0 "hspace =" 0 "vspace =" 0 "style =" width: 800px; height: 189px; "/>


2. Import the ExampleListActivity project slidingmenu open source project)

The BaseActivity class may encounter a compilation error where getSupportActionBar () cannot be used.

Cause:

Because the SlidingFragmentActivity inherited by the BaseActivity class inherits the FragmentActivity,

FragmentActivity does not have this method. Only SherlockFragmentActivity has this method,

The SherlockFragmentActivity is in the actionbarsherlock. jar library.

Note: you cannot modify the code in the imported database. Therefore, you can only modify the code in the project of the database and re-import it.

The modification steps are as follows:

In the library_slidingmenu Library Project, import actionbarsherlock. jar and modify SlidingFragmentActivity.

Extends SherlockFragmentActivity. Finally, import library_slidingmenu.jar to the ExampleListActivity project, and then CLEAN it.


This article is from the "wangcuijing" blog, please be sure to keep this source http://wangcuijing.blog.51cto.com/7233352/1290495

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.