I have tried to update our react native app from 0.67 to 0.70 with this guide:
text
and wasnt able to build android even after returnung to my main branch with out any changes.
I am keep getting the error.
"cannot choose between the following variants of com.facebook.react:react-native:0.71.0-rc.04"
I was tring to update my react native app and expected to be able to build android successfully after the update.
Related
Im trying to build My Expo app with EAS build, but it keeps failing, this fails for Android, i am not sure about IOS, i think it has to do with React native navigation
Here is a Screenshot of my package json
the solution to this problem was the library react-native-navigation:#7.26.0, apparently this library is not compatible with eas build or Expo Go as stated here
I removed the library from my app (i actually never imported it) and my build was successfull
I am trying to create a pipeline for react native mobile application. I have created task group with npm custom task and the command is run android.
While running pipeline in this task is failing continuously. As per the error message:
Execution failed for task com.android.builder.testing.api.DeviceException: No connected devices!
Where is the issue? or what is the command to build android apk in react application?
You will need an Android device to run your React Native Android app. This can be either a physical Android device, or more commonly an emulator.
what is the command to build android apk in react application?
To build android project we can use Gradle, it's a common build tool used for building Android projects. See the Gradle task for more information.
You can reference the following articles to build the android apk:
Build, test, and deploy Android apps
Using Azure DevOps to create a CI/CD pipeline for an Android application built with React Native
Whenever I start a new React Native project and open the android part in the android studio. I get a message to update gradle plugin and gradle .
And updating them leads to erroneous imports which were previously working fine.
So, is there any limitation on gradle plugin or gradle for react-native android projects ?
I am experiencing a strange situation with my React Native project and Android Studio.
BUILDING DEBUG
Using the react-native command line tools, I can build and run my Android app without any problem. (using react-native run-android)
However when I try and build my debug app from Android studio, i get the following error on launch - Module AppRegistry is not a registered callabble module (calling runApplication)
BUT, if I do react-native run-android first, which installs the build and launches the javascript loader terminal, and then after that I continue triggering builds from Android Studio all is well.
So it appears that using Android Studio to build and install a fresh version of the app doesn't work anymore (i have a feeling that the fact that it doesn't launch the javascript package loader terminal is a clue).
BUILDING 'RELEASE'
Similar problems when I try and build the release version.
I can use react-native run-android --variant=release to build and install the APK to a device, with no problem.
If I try and build the release from Android Studio, however, I get a new error on compile which is -
`Execution failed for task ‘:app:bundleReleaseJsAndAssets’
> A problem occurred starting process ‘command ‘node’’`
So it appears that something is wrong with my Android Studio, seeing that I can do everything I need to via react-native command line, but Im not sure what it could be..? I have a feeling that both the debug and release build problems are related, and I feel like its got to do with how Android Studio is triggering the javascript/node stuff. But unsure how to fix, or make sure.
everybody,
Yesterday I Installed everything necessary to develop and run an Android app with React Native on Windows: I updated my node.js, installed python2, react-native-cli, Android Studio with AndroidSDK with all tools and all necesary package details how it is described in React Native documentation. Also I set up Environment variables and path for ANDROID_HOME. Wneh I create a new emulator and run it I received this messages in Android studio:
"Unable to run 'adb': null"
and
"'C:\Users\User5\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary"
When I create and run a new ReactNative app the building stucks on 97%. Attach imgs bellow.
When I create and run project on iOS there is no any problem.
I watched a lot of videos and tutorials and nothing seems wrong. But they all are with older version of Android Studio.
Does anybody know where could be the problem?
Thanks in advance.
My React Native very first Android Project stuck building on this stage: