adobe android sdk,How to import Adobe Creative SDK in Android Studio

问题

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'

回答1:

New setup

The Adobe Creative SDK is now offered as a remote Maven repo.

The gradle setup is covered in the Getting Started guide.

You can also see functioning gradle code in any of the example Android repos on GitHub. For example, with the Image Editor repo, see:

build.gradle

app/build.gradle

Old setup

Note: this is only for legacy versions of the Creative SDK that were available via direct download. For current versions, use the New setup instructions above.

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!

回答2:

As of 26/07/2016 Adobe has a public repository that can be used instead of having to host it on our local source code.

A bit hard to find but here they mention it:

https://helpx.adobe.com/experience-manager/kb/SetUpTheAdobeMavenRepository.html

Using that repo we can change the dependencies to this:

repositories {

// other repos

maven {

url 'https://repo.adobe.com/nexus/content/repositories/releases/'

}

}

回答3:

in my case i changed

classpath 'com.android.tools.build:gradle:3.3.2'

to

classpath 'com.android.tools.build:gradle:3.3.1'

and it work

来源:https://stackoverflow.com/questions/32550562/how-to-import-adobe-creative-sdk-in-android-studio

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值