如何导入的Adobe Creative SDK Android Studio中 [英] How to import Adobe Creative SDK in Android Studio

查看:500
本文介绍了如何导入的Adobe Creative SDK Android Studio中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了麻烦Android Studio中找到的Adobe Creative SDK在我的应用程序。当我尝试建立并运行我的应用程序我得到的错误。

下面是我的code代表的build.gradle(模块:应用程序):

 应用插件:'com.android.application安卓{
    compileSdkVersion 23
    buildToolsVersion23.0.1    defaultConfig {
        的applicationIDcom.example.achins.myapplication
        17的minSdkVersion
        targetSdkVersion 23
        版本code 1
        的versionName1.0
    }
    buildTypes {
        发布 {
            minifyEnabled假
            proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
        }
    }    packagingOptions {
        排除META-INF /相关内容
        排除META-INF / LICENSE
        排除META-INF /注意事项
    }    dexOptions {
        javaMaxHeapSize4G
    }
}依赖{    编译文件树(导演:'库',包括:['的* .jar'])
    编译com.android.support:appcompat-v7:23.0.1
    编译com.adobe.creativesdk.foundation:auth:0.5.3
    编译com.adobe.creativesdk:图片:4.0.0
}

我收到以下错误:

 未能解​​决:com.adobe.creativesdk.foundation:auth:0.5.3
未能解决:com.adobe.creativesdk:图片:4.0.0


解决方案

为了告诉应用程序在哪里的Adobe Creative SDK是在应用程序的文件结构,你要提供你的<$ c中的路径SDK $ C>的build.gradle 文件。

下面是一个例子:

  allprojects {
    库{
        mavenCentral()
        jcenter()        行家{
            网址$ {} project.rootDir / creativesdk回购/发布//添加CREATIVESDK库文件的正确位置
        }
    }
}

在上面的例子中,网​​址路径开始于应用程序的根目录下并查找一个名为 creativesdk回购,然后内,一个名为发布
(如果您已经添加创意SDK在您的应用程序的其他位置,你会想编辑上面点到正确的地方网​​址

在Maven的网​​址是正确的,你的 com.adobe.creativesdk ... 的依赖应该工作。只要确保你的创意SDK的每一部分所使用提供正确的版本号!

有关入门的详细信息,看一看这里Android文档创作SDK:
https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html

您也可以看看在GitHub上工作的build.gradle 例如,在这里:
<一href=\"https://github.com/ashryanbeats/adobe-csdk-android-photo-app/blob/1-getting-started/app/build.gradle\" rel=\"nofollow\">https://github.com/ashryanbeats/adobe-csdk-android-photo-app/blob/1-getting-started/app/build.gradle

I'm having trouble getting Android Studio to find Adobe Creative SDK in my app. When I try to build and run my app I get errors.

Here is my code for build.gradle (Module: app):

apply plugin: 'com.android.application'

android { 
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.achins.myapplication"
        minSdkVersion 17
        targetSdkVersion 23
        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'
        exclude 'META-INF/NOTICE'
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }
}

dependencies {

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

I get the following errors:

failed to resolve : 'com.adobe.creativesdk.foundation:auth:0.5.3'
failed to resolve : 'com.adobe.creativesdk:image:4.0.0'

解决方案

In order to tell the app where Adobe Creative SDK is in your app's file structure, you'll want to provide the path to the SDK in your build.gradle file.

Here is an example:

allprojects {
    repositories {
        mavenCentral()
        jcenter()

        maven {
            url "${project.rootDir}/creativesdk-repo/release" // ADD THE CORRECT LOCATION OF THE CREATIVESDK LIBRARY FILES
        }
    }
}

In the above example, the url path starts at the root directory of the app and looks for a directory called creativesdk-repo, then within that, a directory called release. (If you have added Creative SDK to another location in your app, you will want to edit the url above to point to the right place.)

When the maven url is correct, your com.adobe.creativesdk... dependencies should work. Just be sure you are providing the right version numbers for each part of Creative SDK that you are using!

For more info on getting started, have a look at the Creative SDK for Android documentation here: https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html

You can also have a look at a working build.gradle example on GitHub here: https://github.com/ashryanbeats/adobe-csdk-android-photo-app/blob/1-getting-started/app/build.gradle

这篇关于如何导入的Adobe Creative SDK Android Studio中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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