question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-native init issue version 0.57.3

See original GitHub issue

Description

I have an issue with version “0.57.3”. I made a react-native application using "react-native init", first run was successful, but whenever I wanted to put a button I received this error: java.lang.string cannot be cast to com.facebook.react.unmanager.AccessibilityDelegateUtil$AccessibilityRole

Code

import React from "react";
import { Text, View, Button } from 'react-native';
import styles from "./style";

const Content = () =>
  <View style={styles.container}>
    <Button title="hello"/>
    <Text style={styles.welcome}>Welcome!</Text>
  </View>

export default Content;

Package.json

"dependencies": {
   "react": "16.6.0-alpha.8af6728",
   "react-native": "0.57.3"
 },
 "devDependencies": {
   "babel-jest": "23.6.0",
   "jest": "23.6.0",
   "metro-react-native-babel-preset": "0.48.1",
   "react-test-renderer": "16.6.0-alpha.8af6728"
 },

Environment

System:
  OS: Windows 10
  CPU: x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
  Memory: 1.33 GB / 7.87 GB
Binaries:
  Yarn: 1.6.0 - C:\Users\morteza.taghdisi\AppData\Roaming\npm\yarn.CMD
  npm: 6.0.1 - C:\Program Files\nodejs\npm.CMD

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
thomaswinckellcommented, Oct 21, 2018
1reaction
react-native-botcommented, Oct 21, 2018

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Versions · React Native
Latest version. The most recent stable version will be used automatically whenever a new project is created using the npx react-native init command....
Read more >
React native init is not working in new fresh project
I have tried different versions of react-native so I think the problem is in yarn, node or npm versions that i'm using. {...
Read more >
react-native-video - npm
React Native 0.57 defaults to Gradle 3 & SDK 27. If you need to support an older React Native version, you should use...
Read more >
npmglobalpackages: *react-native*: not found - You.com
if it shows command not found the n you have not installed react native in the directory. Do a npm init in new...
Read more >
Upgrading React Native to version 0.59 and beyond: a step-by ...
This upgrade path is for those people who've either ejected an existing Expo app or created their repository using react-native init and haven't ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found