Closed alexjosesilva closed 5 years ago
@alexjosesilva Aqui tem o passo a passo da instalação do React Native: https://facebook.github.io/react-native/docs/getting-started.html
Você precisa seguir os passos até a seção "Creating a new application", pois já vai estar com sua aplicação criada.
Depois, só executar o comando react-native run-android
para rodar o projeto em emulador Android, ou react-native run-ios
para emular em dispositivo iOS.
Esta ocorrendo erros durante a execução. Qual tua versão do android ?
@alexjosesilva Posta aqui os erros que estão ocorrendo. No momento não estou com nenhum emulador instalado, mas quando testei, foi pelo Genymotion e funcionou no emulador do Samsung Galaxy S8 sem nenhum problema.
λ react-native run-android info JS server already running. info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Configure project :app Observed package id 'platforms;android-23' in inconsistent location 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\android-23' (Expected 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\platforms\android-23') Observed package id 'platforms;android-28' in inconsistent location 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\android-28' (Expected 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\platforms\android-28') Observed package id 'platforms;android-29' in inconsistent location 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\android-29' (Expected 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\platforms\android-29') Observed package id 'platforms;android-23' in inconsistent location 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\android-23' (Expected 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\platforms\android-23') Observed package id 'platforms;android-28' in inconsistent location 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\android-28' (Expected 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\platforms\android-28') Observed package id 'platforms;android-29' in inconsistent location 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\android-29' (Expected 'C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\platforms\android-29') Checking the license for package Android SDK Build-Tools 28.0.3 in C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms\licenses Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':app'.
Failed to install the following Android SDK packages as some licences have not been accepted. build-tools;28.0.3 Android SDK Build-Tools 28.0.3 To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: C:\Users\sulwork01\AppData\Local\Android\Sdk\platforms
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
BUILD FAILED in 6s
não entendi esse erro
estou usando android 9 e 6...porem não funcionou ?
@alexjosesilva Você está emulando? Se sim, executou todos os comandos necessários? Aqui tem um tutorial passo-a-passo da Rocketseat para configurar corretamente sua emulação: https://docs.rocketseat.dev/ambiente-react-native/android/windows
estou usando o emulador Android
Esta aparecendo este erro aqui !
Loading dependency graph, done. error: bundling failed: ReferenceError: Unknown helper objectSpread2 at loadHelper
react-native-cli: 2.0.1 react-native: 0.59.9
corrigir.....apaguei a pasta node_modules e reinstalei com npm install e restarte o package.json com npm start
Quais os passos necessários para executar o app ?