英文:
FFmpeg Android Errors
问题
以下是你要翻译的代码部分:
Ok so im making a kotlin android app and for file conversion from 3gp to wav i added the android ffmpeg library with `implementation 'com.arthenica:mobile-ffmpeg-full:4.4'` then i added this code to convert the files `FFmpeg.execute("-i" + f2 +"/storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.wav")` for further context f2 is `/storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.3gp`
The error log is to large to simply just fit here but heres some of it
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.
I tried to compile however the compiler immediatley rejected my app and refused to compile. I would have expected it to have immidiatley compiled into a apk.
EDIT:
Here is my build.gradle file
```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'
}
英文:
Ok so im making a kotlin android app and for file conversion from 3gp to wav i added the android ffmpeg library with implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
then i added this code to convert the files FFmpeg.execute("-i" + f2 +"/storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.wav")
for further context f2 is /storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.3gp
The error log is to large to simply just fit here but heres some of it
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.
I tried to compile however the compiler immediatley rejected my app and refused to compile. I would have expected it to have immidiatley compiled into a apk.
EDIT:
Here is my build.gradle file
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'
}
答案1
得分: 0
The error is in the gradle file, Please remove below dependency from Gradle.Build
com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:x.x.x
No need to use above dependency because You have used,
implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
Please try below command to convert from 3gp to wav
arrayListOf(
"-i",
"input path",
"output path"
)
英文:
The error is in the gradle file, Please remove below dependency from Gradle.Build
com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:x.x.x
No need to use above dependency because You have used,
implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
Please try below command to convert from 3gp to wav
arrayListOf(
"-i",
"input path",
"output path"
)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论