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。于是,重复了。

  • 相关阅读:
    k8s令牌登录设置方法
    etcd查看集群信息
    go Map
    go 切片重组
    go For-range结构
    go 切片
    go 数组与切片
    go 内存优化
    go 格式化输出
    go 闭包函数
  • 原文地址:https://www.cnblogs.com/chenbuer/p/4768081.html
Copyright © 2011-2022 走看看