com.android.builder.dexing.DexArchiveBuilderException

com.android.builder.dexing.DexArchiveBuilderException

android 应用程序具有依赖项:com.googlecode.objectify 构建项目时抛出以下错误:

com.android.builder.dexing.DexArchiveBuilderException: Failed to process /home/homecomp/.gradle/caches/modules-2/files-2.1/com.googlecode.objectify/objectify/5.1.16/148ca59a5f89b394eb998ce1894d222c7e11131d/objectify-5.1.16.jar  

这是完整的 build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.homecomp.myapplication"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation 'com.googlecode.objectify:objectify:5.1.16'
}

error screenshot

如果 Google App Engine SDK(Objectify 所依赖的)在 Android 上运行,我会感到非常惊讶。如果是这样,它肯定需要 Remote API.

您可以尝试 Objectify6,它使用更新的 Google SDK 和基于 REST 的 API,更有可能在 Android 上运行。你应该检查一下。

就是说...直接从移动应用程序访问您的数据存储区?听起来是个糟糕的主意。