Esse guia mudou, acesse: https://docs.rocketseat.dev/ambiente-react-native/introducao
Melhorias, issues, sugestões redirecionar para: https://github.com/Rocketseat/docs
Antigo guia de Ambiente React Native
Home Page: https://docs.rocketseat.dev/ambiente-react-native/introducao
Esse guia mudou, acesse: https://docs.rocketseat.dev/ambiente-react-native/introducao
Melhorias, issues, sugestões redirecionar para: https://github.com/Rocketseat/docs
Oi, queria saber como usa o emulador Nox, fiz os comandos do curso mas o cli não achou o emulador
Fala galera! sou novo na área de React-Native, e tenho uma duvida que pode ser simples pra muitos.Então, eu criei duas telas, uma de login (app.js )e uma de cadastro (cadastro.js)
Já vi vários videos, comentação do site do react-native, mas não consegui encaixar o que é passado no meu código, não sei exatamente o que devo alterar, o que devo apagar..
alguém pode me dar uma força ae?
agradeço desde já!
aqui o codgo
`// tela inicial "LOGIN"
importar Reagir de ' reagir ' ;
import { Alert , StyleSheet , Texto , Visualização , Imagem , TextInput , TouchableOpacity } de ' react-native ' ;
importar logotipo de ' .//assets//logo.png '
exportar a função padrão App () {
clicou = () => {
Alert . alerta ( " Fala " , " jandeson gayzao! " );
}
return (
< Ver estilo = { estilos . container } >
< Fonte da imagem = {logo}
style = { styles . logo }
/ >
< TextInput
style = { styles . Entrada1 }
espaço reservado = " Usúario "
/ >
< TextInput
style = { styles . Entrada2 }
secureTextEntry = { true }
placeholder = " Senha "
/ >
< Estilo do texto = { styles . Esqueci } > Esqueci a Senha < / Texto >
< TouchableOpacity
style = { styles . botao } onPress = {() => { isto . clicou ()}} >
< Estilo do texto = { styles . botaoText } > Entrar < / Text >
< / TouchableOpacity >
< Estilo do texto = { styles . Cadastro } > N ão sou Cadastrado < / Texto >
< / Ver >
);
}
// padrao reage
estilos de const = StyleSheet . create ({
contêiner : {
flex : 1 ,
backgroundColor : ' #fff ' ,
alignItems : ' center ' ,
justifyContent : ' center ' ,
}
// logo do sig frotas
logo : {
largura : 250 ,
altura : 80 ,
resizeMode : ' contém '
}
// campo de usuario
Entrada1 : {
marginTop : 100 ,
estofamento : 10 ,
largura : 300 ,
fontSize : 16 ,
fontWeight : ' bold ' ,
borderRadius : 5 ,
borderWidth : 1 ,
borderColor : ' # 215f7c ' ,
backgroundColor : ' #fff '
}
// campo de senha
Entrada2 : {
marginTop : 30 ,
estofamento : 10 ,
largura : 300 ,
fontSize : 16 ,
fontWeight : ' bold ' ,
borderRadius : 5 ,
borderWidth : 1 ,
borderColor : ' # 215f7c ' ,
backgroundColor : ' #fff ' ,
}
// botao esqueci senha
Esqueci : {
marginTop : 10 ,
fontSize : 14 ,
cor : ' # 215f7c '
}
// botao entrar
botao : {
marginTop : 200 ,
estofamento : 10 ,
largura : 150 ,
altura : 40 ,
backgroundColor : ' # f44336 ' ,
borderRadius : 5 ,
fontSize : 16 ,
alignItems : ' center ' ,
justifyContent : ' center '
}
// texto do botao entrar
botaoText : {
fontSize : 16 ,
fontWeight : ' bold ' ,
cor : ' #fff '
}
// opção de cadastro-se
Cadastro : {
marginTop : 20 ,
fontSize : 14 ,
cor : ' # 215f7c '
}
});`
Eu posso adicionar os passos de instalação necessários para o Arch Linux, com isso, o guia estaria abrangindo as distribuições mais populares atualmente segundo o DistroWarch.
Estive seguindo o passo-a-passo do curso de React Native (aliás, ótimo curso <3) e na hora do "react-native run-android" dá o seguinte erro:
$ react-native run-android
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Erro: Não foi possível localizar nem carregar a classe principal org.gradle.wrapper.GradleWrapperMain
error 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/getting-started.html
error Command failed: gradlew.bat app:installDebug
Este é o meu ambiente de desenvolvimento para o React Native de acordo com o comando "react-native info":
$ react-native info
info
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Memory: 2.46 GB / 7.91 GB
Binaries:
Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842
Nox
ARC
Android AVD
Estava tendo um problema ao executar o comando react-native init hunt
(Seguindo os passos do curso de react-native da Rocketseat).
O feedback do erro terminava por avisar que:
Command yarn add react-native --exact
failed.
Lembrei que tinha instalado o react-native usando o yarn:
yarn global add react-native-cli
Executei alguns passos da seguinte issue: Unable to install react-native project using yarn #3227
Contudo, o que resolveu foi desinstalar o yarn mesmo.
Não sei se mais gente teve o mesmo problema para ser inserido nos 'erros-comuns.md' do repo.
PS: este erro ocorreu no meu desktop (Windows 10 pro), no meu notebook (ubuntu 18.04) aparentemente tudo foi normal! :)
Estou tentando rodar o emulador pelo Genymotion, parece que vai tudo certo, mas na hora de inicializar da um erro, tentei rodar direto pelo VirtualBox mas acontece esse erro no boot e fica só dando reboot (repetindo essas duas telas de prints abaixo):
Meu sistema Host is Windows 10 (64-bit) 16MB
Alguma ideia do que pode ser?
Estou procurando no suporte do VB mas já perdi algumas horas aqui, qualquer ajuda é bem vinda
segue anexo também o log do virtual box da execução
Samsung Galaxy S8-2020-01-31-13-39-52.log
Conexão via USB
Conexão via Wifi
Estou tentando rodar o emulador pelo Genymotion, parece que vai tudo certo, mas na hora de inicializar da um erro, tentei rodar direto pelo VirtualBox mas acontece esse erro no boot e fica só dando reboot sem iniciar.
Alguma ideia do que pode ser?
Estou procurando no suporte do VB mas já perdi algumas horas aqui, qualquer ajuda é bem vinda
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.