码迷,mamicode.com
首页 > 移动开发 > 详细

android一些小的问题

时间:2015-08-29 00:30:08      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:

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 Files\Java\jdk1.8.0_20\bin\java.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。于是,重复了。

 

android一些小的问题

标签:

原文地址:http://www.cnblogs.com/chenbuer/p/4768081.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!