Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build new react-native project on android #26616

Closed
Cosmin-Ciolacu opened this issue Sep 27, 2019 · 3 comments
Closed

Can't build new react-native project on android #26616

Cosmin-Ciolacu opened this issue Sep 27, 2019 · 3 comments
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@Cosmin-Ciolacu
Copy link

Hi! I created new react native project and I can't build on android

React Native version:
System:
OS: macOS 10.15
CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
Memory: 60.53 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.2.1 - /usr/local/bin/node
Yarn: 1.16.0 - ~/.yarn/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.1 => 0.61.1
npmGlobalPackages:
react-native-cli: 2.0.1

When I try to run my project using react-native run-android it shows me this error:error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment.
Also, when I run from Android Studio it shows this error:ERROR: Android dependency 'org.webkit:android-JSC:r245459' is set to compileOnly/provided which is not supported</code>

This is my package.json file:

{
"name": "churchmap",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"react": "16.9.0",
"react-native": "0.61.1"
},
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/runtime": "^7.5.0",
"@react-native-community/eslint-config": "^0.0.3",
"babel-jest": "^24.1.0",
"jest": "^24.1.0",
"metro-react-native-babel-preset": "^0.51.1",
"react-test-renderer": "16.8.1"
},
"jest": {
"preset": "react-native"
}
}

@react-native-bot react-native-bot added the Platform: Android Android applications. label Sep 27, 2019
@Mhmdabed11
Copy link

Mhmdabed11 commented Sep 27, 2019

I encountered the same problem yesterday. What I did is that inside my android/build.gradle, I replaced maven { url 'https://jitpack.io' } with maven { url 'https://www.jitpack.io' }, then I downloaded jetifier npm install --save-dev jetifier and ran npx jetifier. That solved my problem :)

@Cosmin-Ciolacu
Copy link
Author

npx jetifier

It works thank you very much

@MonsterOfCode
Copy link

I encountered the same problem yesterday. What I did is that inside my android/build.gradle, I replaced maven { url 'https://jitpack.io' } with maven { url 'https://www.jitpack.io' }, then I downloaded jetifier npm install --save-dev jetifier and ran npx jetifier. That solved my problem :)

For me it works just on change the link, 'https://jitpack.io' to 'https://www.jitpack.io' in android studio and make sync.
Thanks

@facebook facebook locked as resolved and limited conversation to collaborators Oct 3, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants