android - Gradle 构建工具找不到 runtime.jar?

标签 android reactjs android-studio react-native bintray

我正在开发 react-native android 应用。

我的问题: 今天突然,当我尝试在 Android studio 中运行我的应用程序时出现错误。

Error:Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0).
Searched in the following locations:
    https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar

我没有在 gradle 文件中更改任何内容,但它突然出现了。但我以前的项目运行良好。

当我运行 url: https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar 它显示 404 NOT找到了。

请帮我解决问题

最佳答案

要解决提到的错误,您只需在项目 gradle 中调用 jcenter() 上方的 maven url,如下所示:

所有项目{

    repositories {
        mavenLocal()
        maven { url "http://dl.bintray.com/developer/maven" }
        maven { url "https://jitpack.io" }
        maven { url 'https://maven.google.com' }
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        jcenter()

    }
}

关于android - Gradle 构建工具找不到 runtime.jar?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50564949/

相关文章:

android - PoweSavingMode 与 App 优化

android - 键盘出现时EditText失去焦点;需要触摸两次才能编辑

android - 具有 View 动态获取行/列的 GridLayout

javascript - 尝试使用 DatoCMS 和 Gatsby JS 按位置对 graphQL 进行排序

java.lang.NoClassDefFoundError : javax/xml/bind/JAXBException after updating to Android Studio 4. 2

java - 通过外部库在 android 中使用更高的 API 级别

android - 线程,UI线程,工作线程,异步任务

javascript - 状态机和 UI : Rendering based on 'node-level' states instead of 'leaf' states

javascript - 期望在箭头函数的末尾返回一个值 array-callback-return on filter function

android studio 3.0 : Could not resolve project :fun:push. 要求:项目:业务:日记