2

I've been trying to properly import this library to begin writing an image editing component for my application. I currently have the downloaded 'creativesdk-repo' folder in the root directory, and have followed instructions according to this tutorial: https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html.

And this tutorial as well: https://creativesdk.adobe.com/docs/android/#/articles/imageediting/index.html

There are no problems building when I simply use the basic authorization library, but my application needs photo editing capability. My foremost problem (among many) lies within the build.gradle file of the application (not the encompassing project build.gradle file).

Here is the code in my build.gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.0"

    defaultConfig {
        applicationId "com.example"
        minSdkVersion 14
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile 'com.adobe.creativesdk.foundation:auth:0.3.94'
    compile 'com.adobe.creativesdk.image:4.0.0'
}

The very last line causes an error message to appear:

Error:Failed to resolve: com.adobe.creativesdk.image:4.0.0: Open File

I believe these messages mean that the image editing portion of the Adobe Creative SDK libraries are not being recognized. I have even tested this with example projects from Adobe and it runs into the same problem. What can I do to fix this and start writing this portion of my application?

HLewis
  • 21
  • 1
  • 5

5 Answers5

6

You need download creative-sdk repo from download links into your project folder. In the project gradle define creative-sdk repo url like this:

    buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

    }

}

In your app build.gradle define this:

  compile 'com.adobe.creativesdk.foundation:auth:0.3.94'
  compile 'com.adobe.creativesdk:image:4.0.0'

You should extend your Application class and implement this, something like this:

public class ExampleApplication extends MultiDexApplication implements IAdobeAuthClientCredentials , IAviaryClientCredentials {
    private static final String CREATIVE_SDK_SAMPLE_CLIENT_ID = "62bbd145c3f54ee39151823358c83e28";
    private static final String CREATIVE_SDK_SAMPLE_CLIENT_SECRET = "2522a432-dfc8-40c4-94fe-646e10223562";        

    @Override
    public void onCreate() {
        super.onCreate();       
        AdobeCSDKFoundation.initializeCSDKFoundation(getApplicationContext());

    }

    @Override
    public String getClientID() {
        return CREATIVE_SDK_SAMPLE_CLIENT_ID;
    }

    @Override
    public String getClientSecret() {
        return CREATIVE_SDK_SAMPLE_CLIENT_SECRET;
    }

    @Override
    public String getBillingKey() {
        return "";
    }        

}

In your AndroidManifest.xml inside Application tag put this:

 <provider
            android:name="com.aviary.android.feather.sdk.internal.cds.AviaryCdsProvider"
            android:authorities="com.package.AviaryCdsProvider"
            android:exported="false"
            android:process=":aviary_cds" />

With this configuration you can call Aviary Sdk Activity with this:

 Intent newIntent = new AviaryIntent.Builder(this);
//config values
startActivity(newIntent);

I configure SDK like this, and its working. Sorry for the delay.

UPDATE 10/10/2016:

Thanks to Ash Ryan:

Trying to make an Android Studio Application with Adobe Creative SDK Image Editing, cannot get libraries compiled in gradle

Community
  • 1
  • 1
encastellano
  • 435
  • 3
  • 5
  • This seems mostly done, but I can't seem to import the multidex class correctly. My original build problem with gradle is resolved now, thank you for that. – HLewis Apr 12 '15 at 21:01
  • Instead Mulidexapplication put Application. I used that becouse i implement múltiple Google play libraries, and recommend that for avoid 65k method bug. – encastellano Apr 12 '15 at 21:04
  • For use multidex, you need to add to gradle this Google Play library – encastellano Apr 12 '15 at 21:09
  • Perfect. No compile errors and I'm on my way to make a photo editor. Thank you again. Is there someway to vote you up? – HLewis Apr 12 '15 at 21:10
  • I have tried this extensively and it's not working for me. I always get "Error:(37, 13) Failed to resolve: com.adobe.creativesdk.foundation:auth:0.3.94 – Jack Jul 06 '15 at 14:46
  • Some time ago the explanation. Maybe they have changed or deprecated dependencies. I just download last release and version number are "0.4.264" try to update in build.gradle – encastellano Jul 06 '15 at 14:53
  • I have tried using the latest version and it still doesn't work, this is driving me crazy. If I open up a new question with how I have set it up, would you mind helping me? – Jack Jul 06 '15 at 18:04
  • I have created another question so you can see what I have set up so far: http://stackoverflow.com/questions/31253379/failed-to-resolve-com-adobe-creativesdkimage4-0-0-when-trying-to-set-up-adobe – Jack Jul 06 '15 at 18:49
  • [This answer](http://stackoverflow.com/a/39956289/4461425) shows the correct way of adding the latest Creative SDK for Android, which uses a remote Maven repo. – Ash Ryan Arnwine Oct 10 '16 at 14:11
3

Use this:

//noinspection SpellCheckingInspection
repositories {
    // ...
    // For Adobe Creative SDK
    maven { url 'https://repo.adobe.com/nexus/content/repositories/releases/' }
}

Source: https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html

Denny Weinberg
  • 2,492
  • 1
  • 21
  • 34
1

I think your error is here. Change:

complie 'com.adobe.creativesdk.image:4.0.0'

for this:

compile 'com.adobe.creativesdk.image:4.0.0'

It`s a simple sintax error.

UPDATE 10/10/2016:

Thanks to Ash Ryan:

Trying to make an Android Studio Application with Adobe Creative SDK Image Editing, cannot get libraries compiled in gradle

Community
  • 1
  • 1
encastellano
  • 435
  • 3
  • 5
  • Ahh, well it solved one error and brought out another: Error:Failed to resolve: com.adobe.creativesdk.image:4.0.0: Thank you for bringing that to my attention though, pretty embarrassing of me. – HLewis Apr 09 '15 at 08:10
  • Dont worry, we are humanns ;). I implemented this library and gave me many problems until I run. Be Lucky – encastellano Apr 09 '15 at 08:17
  • Thank you I suppose. I don't think I quite understand you, but do you have a working project using this library? Just seeing a simple project that works would do me wonders. – HLewis Apr 09 '15 at 08:25
  • Yes, I have a small project that is running this library. In a few hours I will be at home and I can show you how to configure it. (Sorry for my english). Follow the Aviary SDK to install [link](https://developers.aviary.com/docs/android/setup-guide) – encastellano Apr 09 '15 at 08:30
  • Oh thank you so much, and sorry for rudely pointing out your English, it's an accomplishment to know more than one language to begin with. I actually have that link open in another tab right now and it doesn't help me much since there are differences between Aviary before and after it was bought by adobe. – HLewis Apr 09 '15 at 08:38
  • You're right adobe documentation is not clear aboud Image Editing, I take several hours make it work using information from adobe and aviary SDK. – encastellano Apr 09 '15 at 08:46
  • You are a gentleman and a scholar sir, and I thank you for your time. Unfortunately, it is 4:30AM where I am right now and I need to sleep for my sanity. If you would please email me (hunt2100@gmail.com) a copy of said project, I will be forever grateful – HLewis Apr 09 '15 at 09:36
  • I'm working now, it's morning here in about 10 hours I will be at home and I'll add information to this post to help you configure this. I learned a lot in this forum, I would like to return a little bit of knowledge to help people. It is a pleasure – encastellano Apr 09 '15 at 09:39
  • Ahh not enough reputation – HLewis Apr 12 '15 at 21:15
  • Dont worry, its a pleasure ;) – encastellano Apr 12 '15 at 21:16
1

Please make sure under global project repo. If not gradle not able to find the path.

allprojects {
    repositories {

 compile 'com.adobe.creativesdk.foundation:auth:0.3.94'
 compile 'com.adobe.creativesdk:image:4.0.0'

}
Tristan
  • 3,301
  • 8
  • 22
  • 27
kiki_ygn
  • 85
  • 3
0

just use latest lib dependency in Module:app build.gradle file and update your android sdk and android studio

compile 'com.adobe.creativesdk:image:4.6.3'

Muhammad Natiq
  • 213
  • 5
  • 14