React Native APK 未安装在 Oreo 上

时间:2021-05-11 20:39:43

标签: android react-native android-8.0-oreo

最近我用默认值创建了一个新的 React Native 应用程序......基本上所有的东西。在模拟器上,它工作正常,但是,当我尝试在 Android Oreo 上安装它时,它显示“未安装应用程序”消息。 我已经在其他帖子中阅读了有关同一问题的已签名 APK。

也许我应该降级我的 RN 版本..

这是我的build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
       buildToolsVersion = "29.0.3"
        minSdkVersion = 16
        compileSdkVersion = 30
        targetSdkVersion = 30
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.1.0")

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        jcenter()
        maven { url 'https://www.jitpack.io' }
    }
}

提前致谢!

1 个答案:

答案 0 :(得分:0)

我不得不将我的 React Native 版本降级到 0.63 以使其正常工作。