Я использую библиотеку easy-ocr-library и wifi-direct-demo, я только что изменил wifi-direct-demo в соответствии с моим требованием.Gradle build failed, appcompat-v7 issue
Я пытаюсь добавить easy-ocr-библиотеку в приложение для виртуальной библиотеки vifi-direct-demo, , поэтому я добавил easy-ocr-библиотеку в качестве нового модуля в wifi-direct-demo library.
После добавления "легкий OCr-библиотека" в качестве модуля зависимости в "WiFi-директ-демо", я получил
Ошибка: Не удалось завершить выполнение задачи по ': processDebugManifest.
Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [wifi-direct-demo-m4:easy_ocr_library:unspecified] /Users/nikhildange/Desktop/wifi-direct-demo-m2/build/intermediates/exploded-aar/wifi-direct-demo-m4/easy_ocr_library/unspecified/AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.wordpress.priyankvex.easyocrscanner" to force usage
Так как предложено в Error я добавил в AndroidManifest.xml файл WiFi-директ-демонстрационном м2
<uses-sdk android:minSdkVersion="14" tools:overrideLibrary="com.wordpress.priyankvex.easyocrscanner"/>
После нажатия на кнопку 'Make Project', я получаю ниже ошибки
/Users/nikhildange/Desktop/wifi-direct-demo-m4/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/res/values-v17/values-v17.xml
Error:(6, 21) No resource found that matches the given name: attr 'android:textAlignment'.
Error:(10, 21) No resource found that matches the given name: attr 'android:paddingEnd'.
Error:(10, 21) No resource found that matches the given name: attr 'android:paddingEnd'.
Error:(13, 21) No resource found that matches the given name: attr 'android:paddingStart'.
Error:(17, 21) No resource found that matches the given name: attr 'android:layout_marginEnd'.
.
.
.
/Users/nikhildange/Desktop/wifi-direct-demo-m4/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/res/values-v21/values-v21.xml
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'.
.
.
.
Error:Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/nikhildange/Library/Android/sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1
Я добавляю Gradle файл всех 3-х модулей,
easy_ocr_library/бушель ild.gradle
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
compile project(':tess-two')
}
тесс-два/build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 22
}
sourceSets.main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
res.srcDirs = ['res']
jniLibs.srcDirs = ['libs']
}
}
WiFi-прямой демо-m4/build.gradle
apply plugin: 'com.android.application'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
allprojects {
repositories {
mavenCentral()
}
}
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile project(':easy_ocr_library')
}
android {
compileSdkVersion 16
buildToolsVersion "23.0.2"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
После изменения minsdkverson до 15 в файле AndroidManifest.xml wifi-direct-demo-m2
<uses-sdk android:minSdkVersion="15"/>
я получаю ту же ошибку с ниже скриншоте
поблагодарить Герт за ответ !! :) .. но я все еще получаю ту же ошибку .. как я разместил выше .. –
@GreetBerkers я добавил снимок экрана моего проекта после смены minsdkversion на 15. –
try Clean & Rebuild –