When I run app on device with react-native run-android everything is fine.
Once I run app with react-native run-android --configuration Release and it was also fine.
But now when I run this same command I can't see changes in my app it's still the same previous version.
I can't find any command that I can use to somehow clean previous release build for new one.
Can somebody help me with this?
Related
When I run flutter build apk --release everything works just fine, In addition when I connect my phone to the computer and run flutter install -v everything is ok. Also when I run flutter run -v my app is working on my phone just fine.
BUT when I'm sending the apk manually to my phone, install and open my app, it's stuck on the splash screen.
I don't know what can case it not to work manually (since I cannot track my logs).
I'm using firebase, my google-services.json is up to date.
flutter doctor is just fine.
android SDK version 30.0.2.
app/build.gradle compileSdkVersion 30.
gradle version 6.6.1.
classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.android.tools.build:gradle:4.0.2'
Any suggestions how to validate my application? What can case such a problem?
Thanks you!!!
More Information
The only error on flutter run is:
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.name.name signatures do not match previously installed version; ignoring!]
but as I said before the flutter run do works and my app uploads correctly, so I think it is not related to my problem.
Have You implemented release SHA keys ?
After many tests using flutter run -v I encountered that in some cases I'm getting:
Unhandled exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)
I do work with shared_preferences package and that answer sure solve my problem https://stackoverflow.com/a/63027655/12695188
Although this is a specific solution I will describe what I have done in order to find my problem:
flutter pub get
flutter build apk --debug
flutter build apk --profile
flutter build apk --release
connect your physical device to your computer
flutter install -v (to your physical device)
flutter run -v
Solve each problem you find on flutter run -v.
Hope this will help someone out there.
I am new in RN, and frankly in any modern front-end tools. So, I am working on an existing project, where I just run
npx react-native start
to run the project from the terminal, when the packager has started, I run
npx react-native run-ios
on another terminal window, which pretty reluctantly starts the ios simulator and opens the app as well. but the problem occurs when I run
npx react-native run-android
on the same windows, it gives throws an error as given in the screenshot:
To solve the problem, I always open my Android Studio, and build and run the app, which runs the app in the android simulator.
But I would really appreciate if there are some JavaScript or RN geeks who can help me run the app in android by the command
npx react-native run-android
I run a mac, use VS Code, I have yarn, npm installed.
Just try to remove the virtual device from avd manager in android studio and recreate it again. I also faced this issue recently and this is how i solved it. Also, check for any available update in android studio build tools.
Today I created an (empty) Android app using the "react-native-firebase" and "native-base" packages. It works in debug mode, but in release mode crash occurs.
Steps to reproduce the problem:
Create a new app
react-native init BaseTest
cd BaseTest
Install the "native-base"
npm install native-base --save
react-native link
Install the "react-native-firebase"
https://rnfirebase.io/docs/v3.1.*/installation/initial-setup
https://rnfirebase.io/docs/v3.1.*/installation/android
Generating Signed APK
https://facebook.github.io/react-native/docs/signed-apk-android.html
Build release and install
cd android
gradlew assembleRelease
adb install app-release.apk
I could not find the error. Does anyone have any ideas?
Hi I got the same issue and it really aced my head but I managed to resolve it. So instead of running
react-native link run react-native link **native-base**.
I hope this helps. Happy coding :)
I've created a new React Native app with react-native init ProjectName and tried to run it within IntelliJ. For this I've created a new run configuration:
But after run this configuration, only react-native start is executed and not the actual start of the app (react-native run-android). Within a shell it's working, but not with IntelliJ and therefore debugging within IntelliJ is not readily possible.
I'm using the latest React Native version 0.50.1 and IntelliJ 2017.2.5.
Do you know such a problem and do you know how to fix it? For existing applications, it still worked, but not for new ones. After npm install it seems to be buggy also with existing projects.
Known issue, tracked as WEB-29569: the packager messages format has changed in react-native 0.50.*, and WebStorm can't parse the output and start the run command.
As a workaround, you can try downgrading react-native to 0.49.
When I run react-native run-android --variant=Release or any other variant I defined in build.gradle I got stuck on Building 91% > :app:bundleReleaseJsAndAssets. If I run just debug it works fine. It happens as well when running ./gradlew assambleRelease.
When I manually run Build apk from Android Studio, then it successfully creates the apks.
EDIT: When I run apk generated from Android Studio, the app crashes on run. I expect this is due AppRegistry.registerComponent fails when you usually run the app trough studio not trough react-native cli
Usually it takes time in first round. Just try again and in my case it took around 10 mins to build the release.