本工程配套 《给所有开发者的React Native详细入门指南(第一阶段)》文章进行学习
我们的公众号【aMarno】 ,或者直接扫码关注↓↓↓
专注分享React Native开发技术和资源
关注公众号回复RN,可加入RN技术交流群,1群已满,请加2群![]()
关注我在简书的React Native专题 《React Native开发阵营》
我的主页:>>>1.掘金 >>>2.简书
给所有开发者的 React Native 详细入门指南
我们的公众号【aMarno】 ,或者直接扫码关注↓↓↓
专注分享React Native开发技术和资源
关注公众号回复RN,可加入RN技术交流群,1群已满,请加2群![]()
关注我在简书的React Native专题 《React Native开发阵营》
我的主页:>>>1.掘金 >>>2.简书
在项目中引用reactnativebanner库之后界面不现实图片!代码都是按照楼主demo的写的 也没有异常,为什么不显示捏 @MarnoDev
原来是:
{ key: '1', title: 'First', icon: '../../imgs/ic_home.png' },
{ key: '2', title: 'Second', icon: '../../../imgs/ic_yaomeirong.png' },
{ key: '3', title: 'Third', icon: '../../../imgs/ic_shop.png' },
会报:Failed prop type: Invalid prop 'source' supplied to 'Image'
改为
require('../../imgs/avatar.png')
就可以了。
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
(node:82393) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'message' of undefined
at handleError (/Users/huanjulu/Documents/workpace/RNdemo/HelloRN/node_modules/react-native/local-cli/cliEntry.js:35:21)
at
at process._tickCallback (internal/process/next_tick.js:182:7)
(node:82393) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:82393) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
新手
项目里的配置能升级下不
在"react-native-tab-view": "0.0.56",这个版本(原来版本是"react-native-tab-view": "0.0.48",),运行代码会报
Element type is invalid: expected a string(for built-in components) or a class/funtion(for composite components) but got:check then render method of 'TabViewTransitioner'
这个错误的。
0.0.56版本去掉TabViewTransitioner这个依赖的,
把TabBarTop改为TabBar就可以了,
// optional callback which renders a header, useful for a top tab bar
_renderHeader = (props) => {
return <TabBar {...props}/>;
}
运行成功,但是发现BannerTest的图片轮播不能拿不到图片,同时没有自动播放,估计滑动有冲突。
FAILURE: Build failed with an exception.
What went wrong:
Could not create an instance of type org.gradle.invocation.DefaultGradle_Decorated.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
Project react-native-video: provided dependencies can only be jars. com.facebook.react:react-native:aar:0.40.0 is an Android Library.
FAILURE: Build failed with an exception.
Dependency Error. See console for details
BUILD FAILED
Total time: 18.458 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
(node:39314) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
我npm install react-native-video 怎么还是运行不成功呢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.