zoukankan      html  css  js  c++  java
  • android一些小的问题

    1、import android.support.v4.app.FragmentActivity;问题

    参考这个stackoverflow的答案,我添加的之后的效果是这样的:

    On Android Studio, File > Project Structure (Ctrl + Alt + Shift + S) Select app, tab Dependecies, and in the +, put the libraries that you will use:

    2、在上面添加模块之后出现了这个错误:

    Error:Execution failed for task ':app:dexDebug'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program FilesJavajdk1.8.0_20injava.exe'' finished with non-zero exit value 2

    参考stackoverflow的答案

    Probably you dont add suport-v4 library correctly in your project.
    Check this :
    
    1)you have add this library to all modules that need it (If you have more than module in your project like main module and library module).
    2)Check that you dont add this library twice.
    Finally if this didn't resolve your problem try to remove 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 restart the IDE.
    

      我是因为重复添加了这个jar包:android-support-v4.jar。当时已经知道我的问题应该是没有添加这个jar包,所以直接添加在项目的libs文件夹中,但是不知道为什么还是出现了一些问题,所以我按照上面的步骤添加了这个library dependency。于是,重复了。

  • 相关阅读:
    寻找 身边的幸福
    XML指南——XML 确认
    你最隐秘的性格在哪?
    不用邀请也可以申请GMail的方法
    XMLDOM对象方法:Document对象方法
    XPath函数
    XML指南——微软的XML解析器
    简/繁体互相转换
    WEB程序开发常用小工具包
    职业规划之电脑程序员的蘑菇定律
  • 原文地址:https://www.cnblogs.com/chenbuer/p/4768081.html
Copyright © 2011-2022 走看看