SkyWalker
SkyWalker

Reputation: 855

Android Studio Error when adding Adobe Creative SDK

This is my build.gradle file. I have followed this tutorial.

repositories {
    mavenCentral()
    jcenter()
    mavenLocal()
    maven {
        url "${project.rootDir}/mvn-repo/release" //ADD THE CORRECT LOCATION OF THE CREATIVESDK LIBRARY FILES
    }
}

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    packagingOptions {
        exclude 'META-  INF/NOTICE.txt'
        exclude 'META-INF/LICENSE.txt'
    }

    defaultConfig {
        applicationId "com.example.test"
        minSdkVersion 11
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':libraries:collage-views')
    compile 'com.aviary.android.feather.sdk:aviary-sdk:3.6.5'
    compile 'com.adobe.creativesdk:behance:0.2.10'
    compile 'com.adobe.creativesdk:image:4.0.0'

    // Support libraries
    compile 'com.android.support:support-v4:21.0.3'
}

I am getting this error

Error:Failed to find: com.adobe.creativesdk:behance:0.2.10 Open File
Open in Project Structure dialog

Error:Failed to find: com.aviary.android.feather.sdk:aviary-sdk:3.6.5 Open File
Open in Project Structure dialog

Error:Failed to find: com.adobe.creativesdk:image:4.0.0 Open File
Open in Project Structure dialog

Do I need to give path of ${project.rootDir}/mvn-repo/release or need to download the sdk and add it somewhere manually? I'm new to android studio, so I don't know much about it.

Upvotes: 0

Views: 2479

Answers (2)

SkyWalker
SkyWalker

Reputation: 855

I have downloaded Adobe Creative SDK and put it inside the project folder in workspace. The folder name is "creativesdk-repo". Changed the URL in build.gradle file to this:

url "${project.rootDir}/creativesdk-repo"

(or whatever the name of the folder is)

Sync the build.gradle file and it works.

Don't forget to add this..

android {
    ....
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
    }
    ....
}

Upvotes: 5

Dayanand Waghmare
Dayanand Waghmare

Reputation: 3078

Put downloaded sdk into root directory and add

maven {
         url "${project.rootDir}/creativesdk-repo"//your sdk name as it is
      } 

in Application's build.grade file under the "allprojects/repositories" section: as follow

allprojects {
    repositories {
        mavenCentral()
        jcenter()

        maven {
            url "${project.rootDir}/creativesdk-repo" 
        }
    }
}

make sure to add the packaging options to the Application's build.grade file under the "android" section:

packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
    }

Upvotes: 1

Related Questions