I have recently upgraded Cordoova to version 6 with android platforms 5.1.0 and ios 4.0.1 in one of the projects.
After also upgrading all plugins to the latest version the app is finally working again as it should.
However, I have noticed one very annoying difference:
With the old version when I ran the command:
cordova build android
it was compiling the app and installing it on the phone. However, it kept all the "data" from the previous version. So for example localStorage or SQLite database remained available.
When I run the same command under the new version, it replaces the app, removing all of it's "data".
As the app has a "setup process" I will now need to complete this every time I deploy a new version to the phone for testing, which is quite time consuming.
Is there any settings available to change this behavior?
I already checked the change log from Cordova but could not find any evidence what they have changed...
This issue was related to a bug in cordova, which got fixed with the latest release on March 2nd.
To fix it I did:
npm install -g cordova
cordova platform update android#5.1.1
details about the issue:
https://issues.apache.org/jira/browse/CB-10157
So in case you face a similar issue try to update your project - it worked just fine for me.
Related
I'm stuck on pop-up splash screen with the loading progress indicator at 100%
I had Android Studio 4.2 Canary 16 previously installed and updated the Kotlin Plugin from 1.4.10 to 1.4.21. After installing the new version of the plugin I closed and restarted Android Studio which then crashed with error saying that the previous version of the Kotlin plugin failed to be uninstalled.
Subsequent restarts would then always crash Android Studio right before loading my Project.
I then uninstalled both the stable and canary(unzipped folder) Android studio programs and followed the steps as per How to completely uninstall Android Studio from windows(v10)?
I then reinstalled the latest Canary build - Arctic Fox 2020.3.1 and then the previous 4.2 Canary 16 but got the same issue on both versions getting stuck in the splash loading screen.
However installing the latest stable 4.1.1 build seems to work just fine. But I need to use the Canary builds to program Jetpack Compose Projects.
Is the canary build generating different files that the stable build does not? If so can I delete them to create to set up a fresh re-install?
This sounds to me alike a file-system permission or exclusive access issue:
the previous version of the Kotlin plugin failed to be uninstalled
You probably have to manually remove some leftovers from the previous install; on Windows these files are literally distributed all over the place. This may even be required when upgrading stable builds, as I recently had it with the "Fabric for Android Studio" plugin. Launching from the command-line might provide some more clue where it gets stuck (with high probability, when scanning the plugin directory). I've just checked; the Jetbrains Toolbox doesn't even uninstall old versions; %USERPROFILE%\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio (may vary) is where to find the plugins and where to check for file-system permissions. Also make sure, that the desktop shortcut actually points to the one version to run - or try to run studio64.exe directly.
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
in windows 10 in Android Studio 3.2.1
the application is worked correctly after first time of installing but after installing Google Sceneform Tools (Beta) from :
File > Settings > Plugins > Browse Repositories
after installing the plugin android studio should restart and then it's can't launch anymore
anyone can help please ?
One cannot just use any version of Google Sceneform Tools (Beta) with any version of Android Studio. As this one comment suggests, even if it's about other versions (also see the other comments there):
A temporary solution: install Android Studio 3.5.1 + Sceneform 1.5, make sfb file, place in project in Android Studio 3.6.
So in your case, you might probably have to update to Android Studio version 3.5.3 or any other version, which works with the current version 1.16.0, as the Android Studio which you are using appears rather outdated.
If you just want to be able to start Android Studio again, then manually delete the plugin directory from %USERPROFILE%/.AndroidStudio3.2/config/plugins, in order to perform a manual uninstall, as it might be required in order to update Android Studio.
Besides "it's not working" is not an error description. You'd have to start Android Studio from the command line, in order to get some meaningful error message, by which you then could search in the issues on GitHub (if the reason why it doesn't start up anymore might have another cause).
I have had issue #377 filed for this plugin since Oct 16, 2018, and unfortunately it is still open now.
I will update this answer if it is solved or a solution is found.
Update 1 :
the github [repository]2 for this plugin has been archived and it seems no longer supported after reading the documentation here
To increase compatibility with older Android devices (4.0+) for my Cordova App I am wanting to use the Crosswalk Webview instead of the device webview. I am using Cordova Tools (CLI 6.3.0) for Visual Studio (2015 - Update 3) and have added the Plugin "Crosswalk WebView Engine" using the plugins panel in the config.xml. However, when I start up the app, debug it and inspect the useragenet (using "navigator.userAgent" from the console) it is not reporting as running using the Crosswalk WebView Engine.
Now I have heard some people suggest that you remove the Android platform, install the plugin and then rebuild, but that isn't fixing it for me. Perhaps I am removing the Android platform incorrectly? (I am just deleting the folder from disk).
Is this a case of my build steps being incorrect? Any assistance would be appreciated.
After persisting with this problem, assuming it to be a problem with my set-up, I got it working.
The key was to update everything. I installed the latest Java JDK (v1.8) - Updated mt CLI version to 6.5.0 - Installed any updates using the Android Update Manager (I also updated some files within Android Studio itself) and then finally installed Crosswalk (2.3.0).
Works like a dream now.
Google Play is showing Cordova Security Alerts on my app. And they suggested me to update existing cordova version to higher at 4.1.1.
Please migrate your app(s) to Apache Cordova v.4.1.1 or higher as soon
as possible and increment the version number of the upgraded APK. If
you are using a 3rd party library that includes Apache Cordova, please
notify the 3rd party and work with them to address the issue.
I have already upgraded my Cordova version to: 4.2.0 and here is the code:
Mds-MacBook-Pro:BanglaGaanerTaroka Morol$ cordova -v
4.2.0
Mds-MacBook-Pro:BanglaGaanerTaroka Morol$
Google Play Developer console still showing this alert and that affected my latest APK version too.
Is there anyone facing the same issue? Or how to solve it?
Thanks in advance.
First of all, you should understand that there is a cordova CLI version and cordova platform versions.
When google play ask you to update to cordova 4.1.1, he is not asking you to update the CLI to cordova 4.1.1, he is asking you to update the cordova android (platform) version to 4.1.1.
If you update the CLI to 4.2.0 you get cordova android 3.6.4 that is still vulnerable.
So, the first thing you should do is to update the cli to 6.0.0 (latest version right now) with
npm install -g cordova
But updating the CLI isn't enough, you have to update your project too.
Go to your project folder and run
cordova platform update android
That will update your project to Cordova Android: ~5.1.0