嗨,当我试图在android模拟器上运行我的应用程序时,我得到了以下错误,
在我的项目中使用video_compress 3.1.2依赖项,
它在ios模拟器上工作,但是gradle给出了这个错误,我无法搞清楚
我在maven存储库上找到了这个链接,但是我找不到如何使用它
https://mvnrepository.com/artifact/com.otaliastudios/transcoder/0.9.1
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.otaliastudios:transcoder:0.9.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/otaliastudios/transcoder/0.9.1/transcoder-0.9.1.pom
- https://repo.maven.apache.org/maven2/com/otaliastudios/transcoder/0.9.1/transcoder-0.9.1.pom
- https://storage.googleapis.com/download.flutter.io/com/otaliastudios/transcoder/0.9.1/transcoder-0.9.1.pom
Required by:
project :app > project :video_compress
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUİLD FAILED in 20s
Exception: Gradle task assembleDebug failed with exit code 1
Exited
-格拉德尔·科特林-- // implementation("com.otaliastudios:transcoder:0.9.1") / https://mvnrepository.com/artifact/com.otaliastudios/transcoder
我把这个依赖项放在android应用程序下的build.gradle文件中,但是我无法运行它。
就像这样--
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:31.0.2')
implementation("com.otaliastudios:transcoder:0.9.1") //------------------------>new added
}
发布于 2022-11-27 10:42:24
我也犯了同样的错误,正如它所指出的,问题似乎是在maven或google repos上无法获得特定版本的代码转换库。
通过快速的google搜索,我找到了这网页,这表明它可以在jcenter存储库上使用。因此,只要将jcenter()
添加到android/build.gradle文件中,我就能够解决这个问题。它应该看起来类似于这样:
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
希望能帮上忙!
https://stackoverflow.com/questions/74576677
复制相似问题