私はeasy-ocr-libraryとwifi-direct-demoライブラリを使用しています。私の要件に従ってwifi-direct-demoを修正しました。Gradle build failed、appcompat-v7 issue
私はwifi-direct-demoライブラリアプリに というeasy-ocr-libraryを追加しようとしていますので、wifi-direct-demoライブラリの新しいモジュールとしてeasy-ocr-libraryを追加しました。
"WIFI-直接デモ" にモジュールの依存関係として、 "簡単-OCR-ライブラリー" を追加した後、私は
エラーを得た:実行タスクに失敗しました ':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
私は 'プロジェクトを作成します' をクリックした後のwifi-直接デモ-M2
<uses-sdk android:minSdkVersion="14" tools:overrideLibrary="com.wordpress.priyankvex.easyocrscanner"/>
のAndroidManifest.xmlファイルに追加、私はエラー
/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
の下に取得しています私はすべての3つのモジュールのGradleのファイルを追加してい
、
easy_ocr_library/BU変更後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')
}
}
wifi-direct-demo-m2のAndroidManifest.xmlファイルのminsdkversonから1530まで
<uses-sdk android:minSdkVersion="15"/>
私は、画面下のと同じエラーを取得しています
がためヘアートに感謝返信:) ..しかし、私はまだ同じエラーを受けています..私は上に投稿しました.. –
@GreetBerkers私は15にminsdkversionを変更した後私のプロジェクトのスクリーンショットを追加しました –
クリーニング&再構築を試してみてください –