好的,我正在制作一个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
错误日志(log)太大了,不适合这里,但以下是其中的一部分
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.
编辑:
这是我的build.gradle文件
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.icompilecodewithnowarnings.ffmpegthing'
compileSdk 33
defaultConfig {
applicationId "com.icompilecodewithnowarnings.ffmpegthing"
minSdk 26
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
implementation files('src/main/java/musicg-1.4.2.0.jar')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}