FFmpeg Android 错误

问题描述 投票:0回答:1

好的,所以我正在制作一个 kotlin android 应用程序,为了从 3gp 到 wav 的文件转换,我使用

implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
添加了 android ffmpeg 库,然后我添加了此代码来转换文件
FFmpeg.execute("-i" + f2 +"/storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.wav")
以获得进一步的上下文 f2 是
/storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.3gp

错误日志太大了,无法简单地放在这里,但这里是其中的一些

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.3.2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/hiteshsondhi88/libffmpeg/FFmpegAndroid/0.3.2/FFmpegAndroid-0.3.2.pom
       - https://repo.maven.apache.org/maven2/com/github/hiteshsondhi88/libffmpeg/FFmpegAndroid/0.3.2/FFmpegAndroid-0.3.2.pom
     Required by:
         project :app
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.3.2.

我尝试编译,但是编译器立即拒绝了我的应用程序并拒绝编译。我本以为它会立即编译成 apk。

android kotlin gradle ffmpeg android-ffmpeg
1个回答
0
投票

错误出现在 gradle 文件中,请从 Gradle.Build 中删除以下依赖项

com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:x.x.x

不需要使用上面的依赖,因为你已经使用过,

implementation 'com.arthenica:mobile-ffmpeg-full:4.4'

请尝试以下命令将 3gp 转换为 wav

arrayListOf(
            "-i",
            "input path",
            "output path"
        )
© www.soinside.com 2019 - 2024. All rights reserved.