无法使用Parse运行应用程序 [英] Impossible to run app with Parse

查看:153
本文介绍了无法使用Parse运行应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Parse的问题。我有sdk(在Parse.com上下载并在我的项目中解压缩inside / libs文件夹),当我构建一切都很好。



但是当我运行应用程序时,我有以下错误:
$ b

错误:执行任务'失败:app:transformClassesWithDexForDebug'。


com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\程序文件\Java\jdk1.8.0_66\bin\java.exe''以非零退出值2结束


我不知道该怎么做,我搜索并尝试了我在StackOverflow和Parse的github repo上找到的所有内容,但没有任何效果:/ b / b>

有什么想法?



在此先感谢您的回答。

解决方案

简单的在您的gradle文件中添加这些...

  android {
compileSdkVer sion 23
buildToolsVersion23.0.2

defaultConfig {

minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName 1.0

//启用multidex支持。
multiDexEnabled true

}

// add dexOptions
dexOptions {
incremental true
javaMaxHeapSize4g
)b



依赖关系{
提供了fileTree(包括:['* .jar'],dir:'libs')
testCompile' junit:junit:4.12'
compile'c​​om.android.support:appcompat-v7:23.1.1'
compile'c​​om.android.support:support-v4:23.1.1'
compile'c​​om.android.support:design:23.1.1'
compile'c​​om.parse:parse-android:1.11.0'
// add multidex dependency
compile'c​​om.android .support:multidex:1.0.1'

}

参考:<错误:执行失败的任务':应用程序错误:执行失败的任务':应用程序错误:执行失败的任务':应用程序错误:执行失败的任务':应用程序:dexDebug'错误在我的项目中,而我添加了新的依赖项


I have an issue with Parse. I had the sdk (downloaded on Parse.com and unzip inside /libs folder in my project) and when I build everything is good.

But when I run the app,I have this following error :

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 2

I don't know what to do, I search and tried everything I found on StackOverflow and github repo of Parse but nothing works :/

Any idea ?

Thanks in advance for your answer.

解决方案

Simple in your gradle file add these ...

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {

    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

    // Enabling multidex support.
    multiDexEnabled true

}

 // add dexOptions
dexOptions {
    incremental true
    javaMaxHeapSize "4g"
}
}


dependencies {
provided fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.parse:parse-android:1.11.0'
 // add multidex dependency 
compile 'com.android.support:multidex:1.0.1'

}

reference: Error:Execution failed for task ':app:dexDebug' error in my project while I added new dependency

这篇关于无法使用Parse运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆