i’m getting this error while i trying to build android
BUILD FAILED
in 1s
(node:1880) UnhandledPromiseRejectionWarning: Error: /Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/build.gradle' line: 55
* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not get unknown property 'build' for root project 'android' of type org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
at ChildProcess.whenDone (/Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:1880) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1880) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
ionic cordova build android
now i getting this error
:app:processDebugManifest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /Users/anspireagency/.gradle/caches/transforms-1/files-1.1/tbxml-android.aar/3ed1ecc6627bfe7aa681fa1d0e6cfd6b/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="za.co.twyst" to force usage (may lead to runtime failures)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
23 actionable tasks: 3 executed, 20 up-to-date
(node:3131) UnhandledPromiseRejectionWarning: Error: /Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/app/src/main/AndroidManifest.xml:27:5-74 Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /Users/anspireagency/.gradle/caches/transforms-1/files-1.1/tbxml-android.aar/3ed1ecc6627bfe7aa681fa1d0e6cfd6b/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="za.co.twyst" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /Users/anspireagency/.gradle/caches/transforms-1/files-1.1/tbxml-android.aar/3ed1ecc6627bfe7aa681fa1d0e6cfd6b/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="za.co.twyst" to force usage (may lead to runtime failures)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
at ChildProcess.whenDone (/Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:3131) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3131) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest
/Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/app/src/main/AndroidManifest.xml:27:5-74 Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /Users/anspireagency/.gradle/caches/transforms-1/files-1.1/tbxml-android.aar/3ed1ecc6627bfe7aa681fa1d0e6cfd6b/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="za.co.twyst" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /Users/anspireagency/.gradle/caches/transforms-1/files-1.1/tbxml-android.aar/3ed1ecc6627bfe7aa681fa1d0e6cfd6b/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="za.co.twyst" to force usage (may lead to runtime failures)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 17s
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:app:processDebugManifest FAILED
23 actionable tasks: 1 executed, 22 up-to-date
(node:4302) UnhandledPromiseRejectionWarning: Error: /Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/app/src/main/AndroidManifest.xml:27:5-74 Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /Users/anspireagency/.gradle/caches/transforms-1/files-1.1/tbxml-android.aar/3ed1ecc6627bfe7aa681fa1d0e6cfd6b/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="za.co.twyst" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /Users/anspireagency/.gradle/caches/transforms-1/files-1.1/tbxml-android.aar/3ed1ecc6627bfe7aa681fa1d0e6cfd6b/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="za.co.twyst" to force usage (may lead to runtime failures)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 17s
at ChildProcess.whenDone (/Users/anspireagency/Desktop/ahmed f/Doctory/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:4302) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4302) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hey.
for the one of you who still struggle with this, i found out that the line
in config.xml file does not influence.
the solution i found is adding this: “-- – --minSdkVersion=21” to the build command like this:
ionic cordova build android --prod --release – -- --minSdkVersion=19
not work for me.
still shows the error
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] /FOLDER_PROJECT/build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16