React native 在开发模式下,反应本机应用程序卡在Jetify上
我正在尝试在0.60上迁移我的应用程序,但它一直在jetify进程中卡住 基本上,在这一行之后: 运行jetifier将库迁移到AndroidX的信息。您可以使用“-no jetifier”标志禁用它 它只是卡住了,什么也不做。我还需要用于react本机firebase和其他一些本机库的jetifier。有什么建议吗 更新React native 在开发模式下,反应本机应用程序卡在Jetify上,react-native,android-jetifier,React Native,Android Jetifier,我正在尝试在0.60上迁移我的应用程序,但它一直在jetify进程中卡住 基本上,在这一行之后: 运行jetifier将库迁移到AndroidX的信息。您可以使用“-no jetifier”标志禁用它 它只是卡住了,什么也不做。我还需要用于react本机firebase和其他一些本机库的jetifier。有什么建议吗 更新 问题似乎出在符号链接中。我正在使用Lerna。最后,我所做的是重写一个JETIF,指定我需要对哪些模块进行JETIF My jetify index.js: const {f
问题似乎出在符号链接中。我正在使用Lerna。最后,我所做的是重写一个JETIF,指定我需要对哪些模块进行JETIF My jetify index.js:
const {fork} = require('child_process');
const {join} = require('path');
const {getClassesMapping, readDir, chunk} = require('./src/utils');
const cpus = require('os').cpus().length;
const arg = process.argv.slice(2)[0];
const mode = arg && (arg === 'reverse' || arg === '-r') ? 'reverse' : 'forward';
const SEARCH_DIRS = [
........modules here
];
const classesMapping = getClassesMapping();
for (const SEARCH_DIR of SEARCH_DIRS) {
const files = readDir(SEARCH_DIR);
console.log(
`Jetifier found ${
files.length
} file(s) to ${mode}-jetify. Using ${cpus} workers...`,
);
for (const filesChunk of chunk(files, cpus)) {
const worker = fork(join(__dirname, 'src', 'worker.js'));
worker.send({filesChunk, classesMapping, mode});
}
}
以及package.json中的postinstall
:
"postinstall": "cp ./jetify.js ./node_modules/jetifier/index.js"
还有一种情况是,
npx react原生运行的android
stuck处于jetifing状态
如果您运行npm运行android,它也会启动metro服务器
但是,要重新运行npm-run-android
,您需要关闭metro命令窗口,并允许npm-run-android
启动新的metro服务器