【发布时间】:2017-06-01 05:57:33
【问题描述】:
我正在尝试按照 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'
}
但是我一同步这个就收到以下错误
信息:总时间:11.751 秒 信息:Gradle 任务 [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources] 警告:忽略 Android API 工件 com.google.android:android:2.2.1 进行调试 警告:忽略 Android API 工件 com.google.android:android:2.2.1 发布 /home/app/build/intermediates/res/merged/debug/values/values.xml 错误:(2352, 44) 未找到与给定名称匹配的资源(在 'android:textColorHint' 处,值为 '@color/hint_foreground_material_light')。 错误:(2352, 44) 未找到与给定名称匹配的资源(在 'android:textColorHint' 处,值为 '@color/hint_foreground_material_light')。 错误:任务“:app:processDebugResources”执行失败。 com.android.ide.common.process.ProcessException:无法执行 aapt 信息:构建失败 信息:3个错误 信息:2 个警告 信息:在控制台中查看完整的输出
【问题讨论】:
-
请检查
hint_foreground_material_light在color.xml中是否可用 -
我尝试手动放置但它不起作用