尝试实施 CreativeSDK 时出错
Error when trying to implement CreativeSDK
我正在尝试根据 CreativeSDK 指南将依赖项放入 build.gradle。
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "andMKD.IMGEDIT"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
pickFirst 'AndroidManifest.xml'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.adobe.creativesdk.foundation:auth:0.9.1062'
compile 'com.adobe.creativesdk:image:4.0.0'
}
但是我一同步就收到以下错误
Information:Total time: 11.751 secs
Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]
Warning:Ignoring Android API artifact com.google.android:android:2.2.1 for debug
Warning:Ignoring Android API artifact com.google.android:android:2.2.1 for release
/home/app/build/intermediates/res/merged/debug/values/values.xml
Error:(2352, 44) No resource found that matches the given name (at 'android:textColorHint' with value '@color/hint_foreground_material_light').
Error:(2352, 44) No resource found that matches the given name (at 'android:textColorHint' with value '@color/hint_foreground_material_light').
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
Information:BUILD FAILED
Information:3 errors
Information:2 warnings
Information:See complete output in console
Creative SDK 文档说:
The Creative SDK supports Android API Level 16 as the lowest
minSdkVersion, and API Level 24 as the maximum targetSdkVersion
所以尽可能将其降级为 24,或者尝试
中的解决方案
我正在尝试根据 CreativeSDK 指南将依赖项放入 build.gradle。
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "andMKD.IMGEDIT"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
pickFirst 'AndroidManifest.xml'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.adobe.creativesdk.foundation:auth:0.9.1062'
compile 'com.adobe.creativesdk:image:4.0.0'
}
但是我一同步就收到以下错误
Information:Total time: 11.751 secs Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources] Warning:Ignoring Android API artifact com.google.android:android:2.2.1 for debug Warning:Ignoring Android API artifact com.google.android:android:2.2.1 for release /home/app/build/intermediates/res/merged/debug/values/values.xml Error:(2352, 44) No resource found that matches the given name (at 'android:textColorHint' with value '@color/hint_foreground_material_light'). Error:(2352, 44) No resource found that matches the given name (at 'android:textColorHint' with value '@color/hint_foreground_material_light'). Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt Information:BUILD FAILED Information:3 errors Information:2 warnings Information:See complete output in console
Creative SDK 文档说:
The Creative SDK supports Android API Level 16 as the lowest minSdkVersion, and API Level 24 as the maximum targetSdkVersion
所以尽可能将其降级为 24,或者尝试