如何解决react-native-firebase_messaging没有在project.ext.'react-native'.versions.android.compileSdk中定义默认值
我正在使用rsync -avr --exclude=*/exclude_filename_* d1/ d2/
。当我尝试在android中运行项目时,返回错误
const html = `
<!doctype html>
<html>
<head><meta charset='UTF-8'><title>Test</title></head>
<body>
<table><tbody>
<tr><th>Header</th><th>Header</th></tr>
<tr><td>Key 1</td><td>Value 1</td></tr>
<tr><td>Key 2</td><td>Value 2</td></tr>
</tbody></table>
</html>`;
const puppeteer = require('puppeteer');
(async function main() {
try {
const browser = await puppeteer.launch({ headless: false,defaultViewport: null });
const [page] = await browser.pages();
await page.goto(`data:text/html,${html}`);
const data = await page.evaluate(() => {
const dataObject = {};
const tbody = document.querySelector('table tbody');
for (const row of tbody.rows) {
if (!row.querySelector('td')) continue; // Skip headers.
const [keyCell,valueCell] = row.cells;
dataObject[keyCell.innerText] = valueCell.innerText;
}
return dataObject;
});
console.log(data); // { 'Key 1': 'Value 1','Key 2': 'Value 2' }
// await browser.close();
} catch (err) {
console.error(err);
}
})();
解决方法
我找到了解决此问题的方法。我正在将@react-native-firebase/messaging
与Firebase Auth和实时数据库一起使用。由于版本而产生此问题。
因此,我已删除所有firebase库并重新安装,并且现在可以正常使用
我也遇到了关于crashlytics的类似错误-
* What went wrong:
A problem occurred evaluating project ':react-native-firebase_crashlytics'.
> :react-native-firebase_crashlytics has not defined a default in project.ext.'react-native'.versions.android.compileSdk in its build.gradle file.
我正在使用"@react-native-firebase/crashlytics": "8.4.5"
,将其降级为"@react-native-firebase/crashlytics": "8.2.1"
对我有用。
升级所有firebase依赖项对我来说都是有效的
,这适用于我的项目:
我使用“ @ react-native-firebase / messaging”:“ ^ 7.4.2”
我更改了文件node_modules/@react-native-firebase/messaging/android/build.gradle
minSdk : 16,targetSdk : 28,compileSdk: 28,buildTools: "28.0.3"
,
切勿降级您的包装!您应该始终保持最新状态!
我的问题是我安装了一部分@ react-native-firebase / {package},几个月后,我又安装了另一部分{package}。 解决方案是同时安装所有这些(或所需的)软件包:
npm install --save @react-native-firebase/app @react-native-firebase/auth @react-native-firebase/database @react-native-firebase/firestore @react-native-firebase/messaging @react-native-firebase/storage
这适用于我的项目
我在我的项目根文件夹上运行 npx jetify
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。