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

后端 未结 5 2030
梦谈多话
梦谈多话 2021-01-07 06:57

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\' folde

5条回答
  •  北荒
    北荒 (楼主)
    2021-01-07 07:21

    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:

     
    

    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

提交回复
热议问题