-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法将类 JMessageReactPackage中的构造器 JMessageReactPackage应用到给定类型; #188
Comments
我也是这个问题,楼主解决了吗 |
老兄,没仔细看文档的结果,我第一次也出这个错了,应该都是直接执行react-native link才出错的,执行之后,还要修改一个地方。
|
后续可能还会遇到错误,我的就是,因为readme文档说明不全,缺少对jcore-react-native的说明,link也不会自动加上... 产生这个错误的原因是jmessage官方readme文档缺陷造成的,文档中只给出了jmessage的配置,而没给出jcore的配置,希望官方把文档fix一下: fix 1:/android/setting.gradle中添加
fix 2:/android/app/build.gradle中添加
|
React Native 在 0.60 版本后加入 Autolinking 功能,禁用 autolink,手动 link 执行 在项目根目录添加 module.exports = {
dependencies: {
'jmessage-react-plugin': {
platforms: {
android: null, // disable Android platform, other platforms will still autolink if provided
},
},
},
}; 在 private boolean shutdownToast = false;
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new JMessageReactPackage(shutdownToast));
return packages;
} |
不用这样麻烦,直接在项目根目录下,添加
这里的初始化参数,根据自己的情况来修改即可。 |
正解 |
@Macrow 正解。 |
@haihaifgdfsgf 请问你遇到了 |
"jcore-react-native": "^1.3.5",
"jmessage-react-plugin": "^3.1.7",
react-native-cli: 2.0.1
react-native: 0.60.5
``


The text was updated successfully, but these errors were encountered: