Some small problems with Android

Source: Internet
Author: User

1, import android.support.v4.app.FragmentActivity;

Refer to this stackoverflow answer, I added after the effect is this:

On Android Studio, File > Project Structure (Ctrl + Alt + Shift + S) Select app, tab dependecies< /c2>, and in the +, put the libraries, then you'll use:

2. This error occurred after adding the module above:

Error:execution failed for task ': App:dexdebug '.
> com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process ' command ' C:\Program Files\java\jdk1.8.0_20\bin\java.exe ' finished with Non-zero exit value 2

Refer to StackOverflow's answer.

Probably dont add suport-v4 library correctly in your project. Check this:1) You have the Add this library to all modules that need it (If you had more than the module in the your project like Mai N module and Library module). 2) Check that the dont add this library twice. Finally if this didn ' t resolve your problem try to remove the this library from your imported libraries list and your project Modules dependency list and import and add it again from one source to your project, then try rebuild the project or rest Art The IDE.

I have added this jar package repeatedly: Android-support-v4.jar. At that time already knew my question should be not to add this jar package, therefore directly adds in the Project Libs folder, but did not know why still had some problems, so I added this library dependency according to the above steps. So, repeat.

Some small problems with Android

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.