gpt4 book ai didi

java - 包构建不存在 "Build.VERSION.SDK_INT"

转载 作者:行者123 更新时间:2023-12-03 08:11:17 24 4
gpt4 key购买 nike

我想使用此存储库来创建 react native 应用程序,而不是可以在前台和后台运行,但是当我下载此存储库并想要使用它时,我收到此错误:

Task :app:compileDebugJavaWithJavac FAILEDC:\Users\PC\Desktop\shem\rn-heartbeat-master\android\app\src\main\java\com\rnheartbeat\BootUpReceiver.java:11: error: package Build does not existif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {

这是我的基础设施:

Operating system: Windows 10 10.0Max Gradle workers: 12 workers
Java runtime: Oracle Java(TM) SE Runtime Environment 12.0.2+10
Java VM: Oracle Java HotSpot(TM) 64-Bit Server VM 12.0.2+10 (mixed mode, sharing)

我的build.gradle:

ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
}

我的package.json:

"dependencies": {
"react": "16.9.0",
"react-native": "0.61.0",
"react-redux": "^7.0.3",
"redux": "^4.0.1",
"redux-actions": "^2.6.5"
}

最佳答案

import android.os.Build; 添加到 BootUpReceiver.java

关于java - 包构建不存在 "Build.VERSION.SDK_INT",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70741405/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com