如何在Android studio中导入Android DirectoryChooser

如何在Android studio中导入Android DirectoryChooser,android,android-library,android-maven-plugin,Android,Android Library,Android Maven Plugin,我正在尝试使用此目录选择器:。 我已尝试根据说明从Maven Central添加,但出现以下错误: Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : Attribute application@theme value=(@style/MyMaterialTheme.Base) from AndroidManifest.xml:15:5-48 is also

我正在尝试使用此目录选择器:。 我已尝试根据说明从Maven Central添加,但出现以下错误:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@theme value=(@style/MyMaterialTheme.Base) from AndroidManifest.xml:15:5-48
    is also present at [net.rdrei.android.dirchooser:library:3.2] AndroidManifest.xml:9:18-62 value=(@style/DirectoryChooserTheme).
    Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:9:1-40:15 to override.
build.gradle(模块):


如何解决此错误?我的项目和库的主题有问题。任何帮助都将不胜感激。

我想您应该将
工具:replace=“android:theme”
添加到应用程序元素清单中

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.audiorecorder.wel.voicerecorder">

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:launchMode="singleTop"
    android:theme="@style/MyMaterialTheme.Base"
    android:hardwareAccelerated="false"
    android:largeHeap="true">
    <activity android:name="voicerecorder.wel.audiorecorder.com.voicerecorder.MainActivity" android:windowSoftInputMode="adjustPan"> >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
</application>
</manifest>
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'commons-io:commons-io:2.5'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

repositories {
    mavenLocal()
}
apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.audiorecorder.wel.voicerecorder"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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.2.0'
    testCompile 'junit:junit:4.12'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:design:25.1.0'
    compile "commons-io:commons-io:+"
    compile 'net.rdrei.android.dirchooser:library:3.2@aar'

}