Android AudioConverter和FFMPEG错误gradle初始化

时间:2018-03-18 21:18:14

标签: java android ffmpeg android-ffmpeg audio-converter

我正在尝试使用Android AudioConverter(https://github.com/adrielcafe/AndroidAudioConverter)将.AAC文件转换为.WAV。问题是,当我尝试运行我的应用程序时,我收到此错误:

Error:Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'.
> More than one file was found with OS independent path 'lib/armeabi-v7a/libARM_ARCH.so'

这是我的gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '26.0.2'
    defaultConfig {
        applicationId "com.example.a49164.teachmi"
        minSdkVersion 23
        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'
        }
    }
}

repositories {
    maven {
        url "https://jitpack.io"
    }
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    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.4.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.github.adrielcafe:AndroidAudioConverter:0.0.8'
    compile(name:'FFmpegAndroid', ext:'aar')
}

如果我删除此行:

    compile(name:'FFmpegAndroid', ext:'aar')

然后该应用程序无效,因为Android AudioConverter需要ffmpeg才能工作。我该怎么办 ?感谢。

1 个答案:

答案 0 :(得分:0)

Well, in the end I'm not using ffpmeg and I use audiorecorder to record raw data and create a wav file from it.