CordovaJS encountered an error due to a failed manifest merger: the minimum SDK version cannot be lower than version 19 as declared in the code

For the past 48 hours, I have been struggling to build my Cordova app for Android. Every time I attempt to open my project in Android Studio, I encounter an error during the gradle sync process in the run tasks phase:

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 19 declared in library [__tested_artifact__::CordovaLib]/Users/userName/Downloads/MyApp(1.2.5)/platforms/android/CordovaLib/build/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 1

Suggestion: use a compatible library with a minSdk of at most 1, or increase this project's minSdk version to at least 19, or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

I have explored various solutions but none have resolved the issue. I have made adjustments in the manifests of my built project and in the cordova.android node_modules folder by adding the following values:

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" /> 

I have also included the specified values in my config.xml file:

<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="28"/>

Furthermore, I have directed Cordova to build specific versions:

cordova platform add <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f899969c8a97919cb8cfd6c8d6c8">[email protected]</a>

Despite these efforts, I continue to encounter the same error message even when altering the numeric values (19 and 1).

In addition, I created a new empty project and attempted to build it with identical results. The project builds without issues on an older machine of mine, however, the Play Store indicates that it is outdated and poses a security risk.

Another detail worth mentioning is that during the Cordova build process, I notice the following information:

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/Users/userName/Library/Android/sdk (DEPRECATED)

Answer №1

What I found successful was starting with taking out the android platform

eliminate android platform from your project

ionic cordova platform remove android

subsequently, include the android platform using the following commands

ionic cordova platform add android@nightly  

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Can the animation be looped using setInterval()?

Once the images finish sliding in the animation, they continue to slide right endlessly. I've attempted using a setTimeout function to move the images back left and restart the animation, but this causes the setInterval animation to stop. Is there a w ...

Could someone provide me with guidance on how to troubleshoot this error message?

[0] Unhandled rejection MongoError: (Unauthorized) not authorized on admin to execute command { listIndexes: "sessions", cursor: { } } [0] at MongoError.create (/Users/biggahd/Desktop/Mars-EMS-1/backend/node_modules/mongodb-core/lib/error.j ...

Display Images in React Component with Dynamic Loading

I've been troubleshooting for a few hours now, attempting to make a react component display an image of a playing card based on the prop passed in. I've scoured online resources, but the solutions I've come across are leaving me perplexed. ...

Struggling with the integration of a custom login feature using next-auth, leading to being constantly redirected to api/auth/error

Currently, I am facing a challenge while working on my Next.js application. The issue lies with the authentication process which is managed by a separate Node.js API deployed on Heroku. My objective is to utilize NextAuth.js for user session management in ...

Difference between Angular2 import syntax: "use 'import * as <foo>'" or "use 'import {<foo>}'"

There are two different ways to import modules that I have noticed. Most imports seem to follow this syntax: 'import {<something>} (for example, import { Component } from '@angular/core';) The other way of importing looks like this: ...

Exclude objects in array that do not match filter criteria

I am facing a challenge with filtering an array of objects. (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}] 0: {tbi_tblid: 512100013, long_name: "", short_name: "", short_name2: "", trickysort: "", …} 1: {tbi_tblid: 512100013, long_n ...

What is the best way to begin a new conversation in an Alexa Skill?

In my NewContactIntent, users provide data such as first name and mobile number. I want them to be able to restart the dialog at any point by using a RestartIntent. When the user says 'Restart', the RestartIntentHandler should handle the request ...

I currently have an array of strings and wish to print only the lines that include a specific substring

Here i want to showcase lines that contain the following strings: Object.< anonymous > These are multiple lines: Discover those lines that have the substring Object . < anonymous > Error: ER_ACCESS_DENIED_ERROR: Access denied for user ' ...

Coordinate Point Visualization in Three.js CameraHelper

Looking to control the rendering volume of a camera in three.js and obtain the control point. You can achieve this by using a camera helper similar to the example provided in the camera example with the pointMap attribute. console.log(cameraOrthoHelper.p ...

Android ListView fails to display data

My current task involves retrieving a list of friends from Facebook and attempting to display their names and profile pictures in a ListView. Despite the array list containing the data, the UI is not being populated, and no exceptions or errors are showing ...

Issue in CakePHP after modifying the directory of Index

I'm currently working on a project using CakePHP and have come across an issue. Our team developed an Ajax function that sends data to a PHP function responsible for adding a folder (known as "ordner" in German) to the database. Initially, everything ...

Utilizing geolocation within a promise in Ionic 2

Our implementation of the geolocation call is done within a promise in Ionic 2. It functions properly on iOS and older Android versions. In our app.js file, we are executing the geolocation call and resolving it in the initial view. On Android Marshmallo ...

Is there a way for me to create a clickable link from a specific search result retrieved from a MySQL database using an AJAX

Currently, I am attempting to create an ajax dropdown search form that provides suggestions based on results from a MySQL database. The goal is for the user to be able to click on a suggestion and be redirected to the specific product. The code I am using ...

The predicament encountered with user registration in the realm of Node.js

I am encountering a problem with the sign-up route in node.js and MongoDB. Whenever I attempt to post data using Insomnia, it displays an error message. You can find the screenshot of the error [here](https://i.stack.imgur.com/qnGAv.png). Here is the code ...

A Guide to Parsing Nested JSON in Android

I'm looking for a way to extract specific values from a JSON response that I receive by parsing a URL. Unfortunately, I don't have any sample code to show. Can someone provide a simple solution for me? Below, you can see the URL and the response ...

The webpage is failing to render the properties of the JSON object

I'm encountering an issue where my code is successfully displaying the object, but I am unable to access its properties in the console. What might be preventing me from retrieving the information stored in this object? Below is the snippet of code ca ...

Excessive memory usage by Android Constrain Layout leading to memory leaks

I am struggling to understand the issues with the constrain layout. Surprisingly, my old UI only consumed 15 MB of RAM, while the new UI is using around 400MB! Does anyone have any insights or solutions? Old UI The old UI utilized approximately 15MB of ...

Ways to determine if the user is either closing the browser or navigating to a different website

I am looking to set up session management in a manner where all sessions are expired or destroyed when the user closes the browser or tab. However, I would like to retain all the sessions if the user is navigating to another website. Is there a way to ac ...

Conceal dropdown options when there is no text entered

To achieve the functionality of hiding dropdown values when there is no text in the search bar, you can use the following code snippet. The code provided below works perfectly for single selection. However, if you allow multiple value selections, it automa ...

Request Timeout: The server took too long to respond and the request timed out. Please try again later

I'm encountering an issue when attempting to send a dictionary as a JSON to the express API. The error message I keep receiving is: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_NSURLErrorFailingURLSessionTaskErrorKe ...