打包安卓遇到的如下问题:“Cannot get property 'packageName' on null object”,请老师帮忙解答,谢谢!

来源:14-6 打包发布React Native项目【收获果实】

佳谦科技

2019-08-03

老师您好,按照视频进行首次打包,遇到下面的问题,麻烦老师帮忙解决一下,谢谢!
问题:
FAILURE: Build failed with an exception.

  • Where:
    Script ‘/Users/zhuquanming/Documents/project/vscode/crossz/node_modules/@react-native-community/cli-platform-android/native_modules.gradle’ line: 192

  • What went wrong:
    A problem occurred evaluating settings ‘crossz’.

Cannot get property ‘packageName’ on null object

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

项目package.json配置:
{
“name”: “crossz”,
“version”: “0.0.1”,
“private”: true,
“scripts”: {
“start”: “react-native start”,
“test”: “jest”,
“lint”: “eslint .”
},
“dependencies”: {
“console”: “^0.7.2”,
“lodash”: “^4.17.15”,
“prop-types”: “^15.7.2”,
“react”: “16.8.6”,
“react-native”: “0.60.4”,
“react-native-flexi-radio-button”: “^0.2.2”,
“react-native-linear-gradient”: “^2.5.6”,
“react-native-reanimated”: “^1.1.0”,
“react-native-side-menu”: “^1.1.3”,
“react-native-simple-radio-button”: “^2.7.3”,
“react-native-vector-icons”: “^6.6.0”,
“react-native-webview”: “^6.6.0”,
“react-navigation”: “^3.11.1”,
“react-navigation-redux-helpers”: “^3.0.2”,
“react-redux”: “^7.1.0”,
“redux”: “^4.0.4”,
“redux-devtools”: “^3.5.0”,
“redux-thunk”: “^2.3.0”
},
“devDependencies”: {
"@babel/core": “^7.5.5”,
"@babel/runtime": “^7.5.5”,
"@react-native-community/eslint-config": “^0.0.5”,
“babel-jest”: “^24.8.0”,
“eslint”: “^6.1.0”,
“jest”: “^24.8.0”,
“metro-react-native-babel-preset”: “^0.55.0”,
“react-native-gesture-handler”: “1.0.16”,
“react-test-renderer”: “16.8.6”
},
“jest”: {
“preset”: “react-native”
}
}
下面是native_modules.gradle 192行截图:
图片描述

问题截图:
图片描述
麻烦老师帮忙解决一下!万分感谢!

写回答

1回答

佳谦科技

提问者

2019-08-05

老师,您好,问题已经解决,给您添麻烦了 !!!仍然万分感谢!

0
0

RN入门到进阶,打造高质量上线App

解锁React Native开发应用新姿势,React Native新版本热门技术

3144 学习 · 3241 问题

查看课程