惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
F
Full Disclosure
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Threatpost
I
Intezer
V2EX - 技术
V2EX - 技术
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
小众软件
小众软件
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
N
News | PayPal Newsroom
MyScale Blog
MyScale Blog
AI
AI
Vercel News
Vercel News
Spread Privacy
Spread Privacy
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
L
LINUX DO - 热门话题
U
Unit 42
L
LangChain Blog
Recent Announcements
Recent Announcements

博客园 - zhengyan_web

rn 适配 鸿蒙 极光推送集成记录 xcode 打包 报错 main.jsbundle does not exist. 解决gradle与gradle plugin匹配关系以及gradle下载缓慢的问题 ‌华为手机记录密码后页面显示的用户名可以通过修改设置来隐藏 极狐gitlab 搭建 rn node 版本问题 mac 电脑查看已安装的谷歌插件 xcode 15打包报错 网络代理 mac jdk切换 js编码、解码方法(escape,encodeURI,encodeURIComponent区别及用法) grep命令 苹果审核Guideline 2.3.1 - Performance XCode报错Thread 1: EXC_BAD_ACCESS (code=2, address=0x....) mac m1 运行老项目 docker 安装homebrew报错error: Not a valid ref: refs/remotes/origin/master 的解决方法 React Native 新版 pod install 依赖时报错
react-native-background-job 加载依赖报错处理
zhengyan_web · 2025-08-20 · via 博客园 - zhengyan_web

加载依赖时报错信息

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.firebase:firebase-jobdispatcher:0.8.5.

原因:历史包很久不维护,很多地方已经下载不到

处理方式:

  1、从其他地方下载包:https://mvnrepository.com/artifact/com.firebase/firebase-jobdispatcher/0.8.5

image

  2、直接下载 firebase-jobdispatcher-0.8.5.aar 

  3、到node_modules 下  找到第三方库 react-native-background-job,创建libs 目录,把上面的 firebase-jobdispatcher-0.8.5.aar  放进去

image

  4、修改 build.gradle 文件, 远程链接,改成本地加载

dependencies {
//  compile 'com.firebase:firebase-jobdispatcher:0.8.5' 
  compile files('libs/firebase-jobdispatcher-0.8.5.aar')
  compile 'com.facebook.react:react-native:+'
}

  5、参考图:

image

6、build.gradle 文件参考

 
buildscript {
  repositories {
    maven{ url 'https://maven.aliyun.com/repository/google'}
    maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
    maven{ url 'https://maven.aliyun.com/repository/public'}
    maven{ url 'https://maven.aliyun.com/repository/jcenter'}

    google()
    jcenter()
    mavenCentral()

  }
  dependencies {
    classpath 'com.android.tools.build:gradle:3.6.3'
  }
}

apply plugin: 'com.android.library'

def DEFAULT_COMPILE_SDK_VERSION = 27
def DEFAULT_BUILD_TOOLS_VERSION = '25.0.3'
def DEFAULT_TARGET_SDK_VERSION = 27

android {
  compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
  buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION

  // Uncomment to develop with yarn link into node_modules
  //    compileOptions.incremental = false
  defaultConfig {
    minSdkVersion 16
    targetSdkVersion project.hasProperty('targetSdkVersion') ? project.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
    versionCode 2
    versionName "2.0"
    ndk {
      abiFilters "armeabi-v7a", "x86"
    }
  }
  lintOptions {
    warning 'InvalidPackage'
  }
}

repositories {
  maven{ url 'https://maven.aliyun.com/repository/google'}
  maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
  maven{ url 'https://maven.aliyun.com/repository/public'}
  maven{ url 'https://maven.aliyun.com/repository/jcenter'}

  google()
  jcenter()
  mavenCentral()
  maven {
    // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
    url "$rootDir/../node_modules/react-native/android"
  }
}

dependencies {
  compile files('libs/firebase-jobdispatcher-0.8.5.aar')
  compile 'com.facebook.react:react-native:+'
}