简体   繁体   中英

How to Configure AdobeCreative SDK for Android gradle build..Correctly

I have just spent hours trying to find out how to configure the AdobeCreative sdk for my android app because I wanted to add photo editing to my application. The documentation was pretty good but they missed two crucial parts in there documentation which will give plenty of developers headaches. I'm going to answer my question below.

First follow all the documentation from https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html

However, for your Project gradle.build , the documentation says:

Your Android Studio project contains by default two build.gradle files. In the Project build.gradle file, replace the allprojects block with the following code:

allprojects {
    repositories {
        jcenter()
        maven {
            url "${project.rootDir}/creativesdk-repo/release" // Location of the CSDK repo
        }
    }
}

Be sure to sync your project with the Gradle files after making any edits.

But you should really replace your files with:

allprojects {
    apply plugin: 'maven'

    repositories {
        jcenter()
        mavenCentral() //ADD THIS
        maven {
            url "${project.rootDir}/creativesdk-repo/release"
        }
    }
}

Notice I added mavenCentral() //ADD THIS .

Without this I received the following errors when doing my gradle build, and I was not able to import any of the classes needed to complete my gradle build:

Error:(38, 13) Failed to resolve: com.adobe.creativesdk.foundation:auth:0.7.329

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM