问题描述
我有一个Parse的问题。我有sdk(在Parse.com上下载并在我的项目中解压缩inside / libs文件夹),当我构建一切都很好。
但是当我运行应用程序时,我有以下错误:
$ b
错误:执行任务'失败:app:transformClassesWithDexForDebug'。
我不知道该怎么做,我搜索并尝试了我在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'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'
}
参考:
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'.
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运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!