试图与的Adobe Creative SDK图像编辑一个Android Studio应用程序,不能让图书馆的gradle中编译 [英] Trying to make an Android Studio Application with Adobe Creative SDK Image Editing, cannot get libraries compiled in gradle

查看:922
本文介绍了试图与的Adobe Creative SDK图像编辑一个Android Studio应用程序,不能让图书馆的gradle中编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图正确导入这个库开始为我的应用程序写入图像编辑组件。我公司目前已在根目录下下载的creativesdk回购的文件夹,并按照本教程操作指导:
https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html.

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.

和本教程,以及:
https://creativesdk.adobe.com/docs/android/# /articles/imageediting/index.html

有没有问题,当建筑我只是使用基本授权库,但我的应用程序需要的照片编辑功能。我(在许多)最重要的问题在于应用程序(不包含该项目的build.gradle文件)的文件的build.gradle内。

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

下面是我的build.gradle文件中的code:

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:

错误:无法解析:com.adobe.creativesdk.image:4.0.0:
打开文件

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

我相信这些消息意味着的Adobe Creative SDK库的图像编辑一部分不被认可。我甚至与Adobe的示例项目测试这一点,它运行到同样的问题。我能做些什么来解决这个问题,并开始写我的应用程序的这一部分?

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?

推荐答案

您需要从下载链接下载创意SDK回购到项目文件夹。在项目定义的gradle创意SDK回购网址是这样的:

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
        }

    }

}

在你的应用程序的build.gradle定义这个:

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 "";
    }        

}

在应用标签内的Andr​​oidManifest.xml把这个:

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" />

通过这种配置可以调用SDK观鸟活动与这样的:

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

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

我配置SDK这个样子,和它的工作。抱歉耽搁。

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

这篇关于试图与的Adobe Creative SDK图像编辑一个Android Studio应用程序,不能让图书馆的gradle中编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆