Christian
Christian

Reputation: 26387

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

My app builds without problems when I'm doing a debug build but fails for a release build. I have to download the PDFTron libraries from AWS via the project build.gradle:

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "s3://pdftron-maven/release"
            credentials(AwsCredentials) {
                accessKey AWS_ACCESS_KEY
                secretKey AWS_SECRET_KEY
            }
        }
    }
}

I however get the error:

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...)

In my gradle.properties file I have declared

AWS_ACCESS_KEY=...
AWS_SECRET_KEY=...

The build types I specified are:

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

What's different about the release build from the debug build that could have caused this error?

Upvotes: 0

Views: 282

Answers (1)

Shirley G
Shirley G

Reputation: 372

PDFTron's Gradle integration has been changed, use the following instead:

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

See: https://groups.google.com/forum/?fromgroups#!topic/pdfnet-sdk/K9HMKRtrQmg for more details.

Upvotes: 1

Related Questions