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?
Related
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'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.
The error I get on the console; When I run the command "phonegap emulate android"
->Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: C:\Users\wende\AppData\Local\Android\sdk\tools\templates\gradle\wrapper
I also experienced this issue (among many others) in my attempts to get a phonegap app to work in my environment.
I found a solution in the second response (by jcesarmobile) to this question:
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK - Android
Specifically, I had to make sure my Android Studio and Android SDK Tools were updated to the latest version, and then I had to update my Cordova Android platform to version 6.2.2.
phonegap cordova platform rm android
phonegap cordova platform add android#6.2.2
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.
I have an existing Cordova app that I've been testing in Xcode.
The workflow was simple:
1. cordova build ios
2. open xcode project file in Xcode
3. either run in simulator or build directly to device
I'm tyring to figure out the same for running an Android build for testing.
1. Installed Android Studio
2. Installed and configured Android SDK 19
3. When I setup my run configuration, it says:
"AndroidManifest.xml doesn't exist or has incorrect root tag"
I've followed the trail to Cradle, migrating existing project to Cradle, but have been unsuccessful so far in figuring out how to take an existing Cordova project and getting it to run on my device.
Is there a workflow as easy as Xcode's 1...2...3... for Android?
As far as I know, android studio isn't officially supported by cordova/phonegap yet, you should use the ADT.
But here you can read how to work with android studio beta and cordova/phonegap
http://iphonedevlog.wordpress.com/2014/10/10/using-android-studio-beta-with-cordova-phonegap/