`
- 浏览:
86859 次
- 性别:
- 来自:
长沙
-
【Android报错之一】finished with non-zero exit value 2
1. 错误:
Android Studio中编译运行loginweb项目的时候,报出了上述错误:
Error:Execution failed for task ':loginweb:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'M:\java\jdk7u45\bin\java.exe'' finished with non-zero exit value 2
2. 原因:
项目中出现了重复加载的jar包。
(1)libs目录下存放有jar包,但是build.gradle中也写了导包语句。
(2)新引入的Library项目中引用了主项目中已经引用的jar包,导致重复加载包。
3. 解决思路:
(1)先检查Android 兼容包 support-v4 和 support-v7 包;
(2)再检查一些常用的开源项目,比如:Gson、Butter Knife、EventBus、Nineoldandroids等。
(3)建议:不要将jar包放到libs目录下,而要用Gradle构建,即在build.gradle中写导包语句。
4. 我的报错原因及解决
我的项目报错,属于第(1)个原因,即在libs目录下和build.gradle中都导了Butter Knife的包。
因此,把libs目录下的jar包删除,再运行,就成功了。
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
解决androidstudio中出现finished with non-zero exit value 1,或者finished with non-zero exit value 2的问题
今天看到我的上传权限被提升到了25MB,于是赶紧重新打包上传了一份,只需要下5个文件了。 需要下载的朋友请下载这个(区别是标题里的文件号,这个是x/8,新上传的是x/5):...
调用sklearn中的XGBoost模型时,没有出现报错警告,但最后输出出错,不能正常输出准确率 // XGBoost model = xgb.XGBClassifier() model.fit(x_train, y_train) print('XGBoost model', model.score(x_test, y_test)...
网上各种解决方法,但是我都试了不可以,我实验发现如果不采用gpu环境的pytorch程序无报错,采用使用gpu的pytoch程序报错,采用gpu的tensroflow和keras不报错。这就让我很疑惑,为什么只有采用gpu的pytorch程序才会...
编程中出现的问题汇总:actionbar和Toolbar区别actionbar渐变色toolbar渐变色(style中设置)actionbar上显示 search_viewsearch_view显示图标,不显示文字fab中一些子选项图标,需要修改...processDebugResources'....
一些简单常用是opencv 函数,方便用户使用
clonezilla-live-2.4.2-10-i586 再生龙 系统备份
Android-Download-Manager Android/Java download manager library help you to download files in parallel mechanism in some chunks. Overview This library is a download manager android/java library which ...
信得过我就下载,肯定成功! SDK文件下缺少emulator-1 还要下载 SDK文件下缺少emulator-2 ... 11:43 Emulator: [5984]:ERROR:android/android-emu/android/qt/qt_...11:43 Emulator: Process finished with exit code 2
Test and debug your app on the Web under load with real users, and then submit the finished product to the Android Market This book received valuable community input through O'Reilly's Open ...
thrift-编译工具
android学习之aidl的资料1 方便大家学习aidl.并测试上传资源。谢谢大家
Test and debug your app on the Web under load with real users, and then submit the finished product to the Android Market This book received valuable community input through O’Reilly’s Open Feedback...
NULL 博文链接:https://zzc1684.iteye.com/blog/2305849
信得过我就下载,肯定成功! 11:43 Emulator: [5984]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at D:\AndroidSDK\emulator\...11:43 Emulator: Process finished with exit code 2
Emulator: Process finished with exit code 1 Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT 解决方法 设置好系统的环境变量后重启 其中ANDROID_HOME的值为你下载的Sdk的路径, ...
Drivers of Finished-Goods Inventory in the U.S. Automobile Industry
jQuery中的一切都构建于这个函数之上,或者说都是在以某种方式使用这个函数。这个函数最基本的用法就是向它传递一个表达式(通常由 CSS 选择器组成),然后根据这个表达式来查找所有匹配的元素。 默认情况下, 如果...
' the file pointer after the write operation is finished. ' Private Declare Function WriteFile Lib "kernel32" _ (ByVal hFile As Long, ByVal lpBuffer As String, _ ByVal nNumberOfBytesToWrite As Long,...
xml java系统源码 ##Gradle+Scala+Java+SpringMVC Web应用解决方案 ###框架组成(Project Architecture) Gradle > > finished > 2016-10-23 ...finished ...finished ...finished ...finished ...finished ...finished