Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova - Android updates (freeze versions)

If I need to do some updates in my cordova app (HTML, JS, CSS) after a few months or weeks, running cordova build android --release --buildConfig gives me an error.

Usually opening android studio and installing all the updates fixes the errors.

Facts:

  • I didn't remove the platform
  • Last time it worked just fine
  • no update was made to my laptop, android studio or any software.

Looks like, in time, the cordova code remains outdated and the build knows that and forces me to update in order to build.

How can I make the cordova project maintain it's own core resources/plugins and be able to build my JS/HTML/CSS without worrying if the latest android SDK does not comply with a plugin or cordova version?

like image 449
Adrian Florescu Avatar asked Jun 17 '16 15:06

Adrian Florescu


People also ask

Is Android 12 supported by Cordova?

We have integrated the Android 12 SplashScreen API including the compatibility library into the core of the Cordova-Android platform to provide support for Android API 22+. For more information, please refer to the PR and Cordova Docs.

How do I update Cordova to latest version?

Update Cordova CLI, cordova Then compare the returned version number to the output of npm info cordova version (You can also check manually for the newest available version on npm or GitHub). Run cordova -v again after the update to make sure the update worked and it now returns the current version.

What is Cordova Android version?

11.0.0 • Public • Published 4 months ago. 11 Dependencies.


1 Answers

You don't really say if you are using any tool sets outside of vanilla Cordova, so take a look at TACO. It wouldn't necessarily be my first pick for Cordova tool kits, but if you want a Cordova build tool that manages the SDK setup for you, TACO does that (as opposed to something like Ionic which requires you to manage the SDK for Android/iOS separately).

To install the 3rd party dependencies for Android, run

taco install-reqs android

The above command first checks for the following dependencies and installs them if found missing:

  • Java JDK
  • Android SDK (includes ADB and gradle as part of the install, as well as all necessary Android packages)

Source: http://taco.tools/docs/configure-platform.html

PhoneGap Build and IntelXDK build remotely for free, and they manage the SDK libraries for you and you can build iOS projects without owning a Mac (you send up your HTML/JS/CSS and a build file, get back an APK/IPA). Telerik has some build service as well, but I think you have to subscribe to it. But with all three of those, I think you have to go whole hog and completely migrate your project to their tool kits. TACO should be less invasive to your current project.

like image 146
getglad Avatar answered Nov 15 '22 04:11

getglad