制作发布版本时 AWS 代码不存在,但它适用于调试版本

AWS code doesn't exist when making a release build but it does for debug builds

当我进行 debug 构建时,我的应用程序构建没有问题,但在 release 构建时失败。我必须通过项目 build.gradle:

从 AWS 下载 PDFTron 库
allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "s3://pdftron-maven/release"
            credentials(AwsCredentials) {
                accessKey AWS_ACCESS_KEY
                secretKey AWS_SECRET_KEY
            }
        }
    }
}

但是我得到了错误:

The AWS Access Key Id you provided does not exist in our records. (Service: Amazon S3; Status Code: 403; Error Code: InvalidAccessKeyId; Request ID: 8733...; S3 Extended Request ID: zh7Nv...)

在我的 gradle.properties 文件中我声明了

AWS_ACCESS_KEY=...
AWS_SECRET_KEY=...

我指定的构建类型是:

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.release
    }
}

release 构建与 debug 构建有何不同可能导致此错误?

PDFTron 的 Gradle 集成已更改,请改用以下内容:

maven {
    url "https://pdftron-maven.s3.amazonaws.com/release"
}

有关详细信息,请参阅:https://groups.google.com/forum/?fromgroups#!topic/pdfnet-sdk/K9HMKRtrQmg