I'm trying to run a React Native project in my Ubuntu 16.04 PC using the react-native run-android command. However it gives me the following error.
The strange thing is that when I create and run an Android project using the Android Studio for the API level 23, it compiles and runs perfectly fine.
Can someone help me with this issue please?
Have you checked you have build-tool version 23.0.1 installed?
you can check it in your SDK manager
Upgrading the Gradle version solved my issue.
I went through the following steps.
Opened the android folder inside the React Native project using
Android Studio.
Accepted the prompt that shows to update the version
of Gradle.
Related
I´m trying to run react-native in a android emulator (ejected expo project), but react-native cannot find a proper version of the SDK. If I run react-native doctor, this is what the it is displayed:
Note that I've added every single possible Android SDK build version from Android Studio, and none of them seems to be accepted by react-native...
Any clues?
Whats the issue?
I get a version mismatch on react native (android).
React Native version mismatch. JavaScript version: 0.59.9 - Native version: 0.63.4
The build works as described in this issue when running through Android Studio. The build however works fine when running: react-native run-android.
Please let me know what else I can try, or what might cause the issue.
React Native version: 0.63.4
Expected Results
The app running as expected
What have I tried to resolve the issue
Clearing caches
Forcing versions through build.gradle
(React Native version mismatch)
Going back in history through git
Reinstalling / trying other emulator versions
Remove node_modules and reinstall
Tried react-native-clean-project
(https://github.com/pmadruga/react-native-clean-project)
Uninstalling
the app from the emulator manually
Was building with SDK Tools 29, also tried with 30 (was working with 29 before)
Tried different versions of Android Studio (4.1, 4.0, 4.1.1. (current))
Tried downgrading to RN 0.62.2
Tried downgrading to RN 0.63.3
Console Error
My "nuclear" option that usually works is to just delete the entire repo from my local machine and then pull it back down from the cloud and start completely fresh.
Definitely not ideal, but sometimes literally nothing else works. I'm not even sure what causes this error as it just appears out of the blue and usually I haven't upgraded react-native for months or even years before it decides to show up.
Are you using a library (3rd party) that is using a react-native version different than your project's react native version?
in my case i was using react-native-v8 in my project and upon upgrading my rn project's version i got this error, so i matched the versions in the correct way.
here is the link for more info, i guess these problems have a similar source.
React Native version mismatch
I got this error when i run ionic run android in my ionic 3 app console.
I saw many posts of it in stack over flow but nothing solve my issue.
ANDROID_HOME=C:\Users\XXXX\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_101
Error: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
I had same issue with cordova app (not ionic 3). I uninstalled sdk android and I installed Android Studio and now it works.
My AS is 2.3 official version
and I already open the Instan run on the settings
but it can't use,and the lightning symbol is always not light,just like this
I don't why this is,who has other ideas?
Make sure the Android Gradle plugin is version 2.3.0 and Gradle is version 3.3.
Else it wont work. Android studio should tell you that by default. Normally when you open your project or after a clean build.
I upgraded to Android Studio 2.2 yesterday since it's made available in the stable channel. An app that I had working properly in AS v2.1.3 now results in the following error whenever I try to Debug/Run the app.
A problem occurred configuring project ':app'. Could not get unknown
property 'compileReleaseJavaWithJavac' for project ':app' of type
org.gradle.api.Project
If I change Gradle Plugin version to 2.1.3 in build.gradle(Project), everything works again and I can run/debug the app without issue.
I have searched on SO and found similar posts but none of the suggested solutions worked for me so far. I'm developing on a Mac and using the embedded JDK shipped with 2.2.
Please try to remove the $PROJECT_HOME/.gradle directory after changing the gradle plugin 2.2.0, and clean and build again.
I upgraded my Mac to Sierra and now everything is working fine. I no longer get any error when I run/debug app on Android devices. I'm using Android Studio 2.2 with Gradle plug-in 2.2.0.
So for anyone experiencing similar issues with Android Studio 2.2 and Yosemite, try upgrading your OS and see it resolves the issue. Good luck.