当前位置: 首页 > 知识库问答 >
问题:

错误:导入ParseUI-widget并作为模块登录时,任务“app:dexDebug”执行失败

涂煌
2023-03-14

我是解析的新手,我对解析UI登录和解析UI小部件有一些问题。

在我的项目中将ParseLoginUI作为一个模块导入后,我单击了run app按钮,错误发生了。

我与Han有完全相同的问题(错误:任务执行失败:app:dexDebug’。将ParseLoginUI作为模块导入时),但是,他提供的解决方案对我不起作用。。

我还可能提到,我不知道说明书中的“克隆项目”是什么意思,我下载了zip并从“我的下载”中将模块导入android studio。

下面是我的应用程序构建。

apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.joakim.parsetest"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], exclude: 'android-support-v4.jar',dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile project(':ParseUI-Login')
    compile project(':ParseUI-Widget')
}

下面是ParseUI-Login build.gradle

apply plugin: 'android-library'

dependencies {
    compile 'com.android.support:support-v4:22.0.0'
    compile 'com.parse:parse-android:1.10.1'

    provided 'com.facebook.android:facebook-android-sdk:4.0.1'
    provided files("$rootProject.projectDir/ParseUI-Login/libs/ParseFacebookUtilsV4-1.10.1.jar")
    provided files("$rootProject.projectDir/ParseUI-Login/libs/ParseTwitterUtils-1.10.1.jar")
}

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.1"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 21
    }
}

下面是ParseUI-widgetbuild.gradle

apply plugin: 'com.android.library'

dependencies {
    compile 'com.parse:parse-android:1.10.1'

    androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
    androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
    androidTestCompile 'org.mockito:mockito-core:1.10.19'
    androidTestCompile 'org.skyscreamer:jsonassert:1.2.3'
}

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.1"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 21
    }
}

共有1个答案

司徒元明
2023-03-14

在您的应用程序构建中。gradle试试这个:

dependencies {
    compile fileTree(include: ['*.jar'], exclude: 'android-support-v4.jar',dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.parse.bolts:bolts-android:1.1.4'
    compile 'com.parse:parseui-login-android:0.0.1' 
}

我的应用程序的ParseUI登录也遇到了类似的问题,这对我很有效。

 类似资料:
  • 我面临这个运行时错误。它说: 错误:任务“:app:dexDebug”的执行失败。 com.android.ide.common.process.ProcessExcture:org.gradle.process.internal.ExecExc0019:进程'命令'/usr/lib/jvm/java-8-oracle/bin/java"完成非零退出值2 这是我的身材。渐变脚本: 请帮帮我。谢谢!

  • 我在build.gradle中使用以下依赖项: } 我已经注释了一行 为了避免不匹配,但仍然得到以下错误: 错误:任务“:app:dexDebug”的执行失败

  • 我是第一次使用Android Studio,在导入项目后出现以下错误(以前是eclipse项目,我也遇到了问题) 以下是提供的信息: 应用程序版本。gradle是这样的: 项目建成。gradle是这样的: 你知道问题可能是什么以及如何解决吗?对这个问题的一个好的解释也会很有用,因为我是Android Studio的新手。提前谢谢:)

  • 我是Parse新手,我对ParseLoginUI有一些问题。 将解析LoginUI作为模块导入我的项目后,我单击了运行应用程序按钮,并且发生了错误。我已经在网站上搜索了2天的解决方案,但没有人工作。 下面是我的应用build.gradle 下面是ParseLoginUI build.gradle 有什么问题吗?因为我按照这个网站里的教程:https://github.com/ParsePlatfo

  • 我的Android Studio项目有一个问题,它编译得很好,我不知道我做了什么,破坏了它。 错误:任务': app: dexDebug'执行失败。com.android.ide.common.internal.LoggedErrorException:无法运行命令:C:\用户\Moritz\AppData\本地\Android\sdk\build-tools\21.1.1\dx.bat--dex

  • 错误:任务执行失败 ': app:使用合并Java Res For Debug转换资源'。 com.android.build.api.transform.TransformException:com.android.builder.packaging.DuplicateFileException: APK META-INF/LICENSE File1中复制的重复文件: C:\用户Jithin-P