This is the error that I'm getting.
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:razorpay_flutter] D:\All Data\My Projects\Mine Created Flutter Projects\gym_work\build\razorpay_flutter\intermediates\library_manifest\debug\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="com.razorpay.razorpay_flutter" to force usage (may lead to runtime failures)
How do I solve it?
Just add
android{
defaultConfig{
minSdkVersion 19
}
}
to android/app/build.gradle in you project directory
Related
how to fix this warning?
Warning: Mapping new ns http://schemas.android.com/repository/android/co
mmon/02 to old ns http://schemas.android.com/repository/android/common/0
1
I think the issue is related to buildToolsVersion. Try downgrading its version:
Go to app > build.gradle
Right under compileSdkVersion, change buildToolsVersion("30.0.3") to buildToolsVersion("30.0.2")
If you don't find any buildToolsVersion inside your gradle file, please add it. (It uses the new version by default).
I am starting with flutter, and overall, I am getting an idea but have hit the wall with what I find to be one of the main reasons to consider migrating from HTML + JQueryMobile: speech to text implementation.
I have found the speech_to_text package (https://pub.dev/packages/speech_to_text#-installing-tab-), followed the instructions to :
1. update the pubspec.yaml file with the dependency &
2. instal the package from command line
3. import the package in the code
but have hit the wall with the minimum SDK requirements not being met by the package. Here is the error message:
C:\Users\TOTAL\FlutterPro\Flutter4\flutter4\android\app\src\debug\AndroidManifest.xml
Error: uses-sdk:minSdkVersion 16 cannot be smaller than version 21
declared in library [:speech_to_text]
C:\Users\TOTAL\FlutterPro\Flutter4\flutter4\build\speech_to_text\intermediates\library_manifest\debug\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 21, or use
tools:overrideLibrary="com.csdcorp.speech_to_text" 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 21 declared in library [:speech_to_text]
C:\Users\TOTAL\FlutterPro\Flutter4\flutter4\build\speech_to_text\intermediates\library_manifest\debug\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 21,
or use tools:overrideLibrary="com.csdcorp.speech_to_text" 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. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 11s Exception: Gradle task assembleDebug failed with
exit code 1
Strangely, I have managed to bypass this once but can not find the
relevant piece of code in the app folder now. Worse, the mentioned file
> C:\Users\TOTAL\FlutterPro\Flutter4\flutter4\android\app\src\debug\AndroidManifest.xml
does not contain any reference to SDK, only this:
< <manifest
<xmlns:android="http://schemas.android.com/apk/res/android"
< package="com.example.flutter4">
> <!-- Flutter needs it to communicate with the running application
> to allow setting breakpoints, to provide hot reload, etc.
> -->
> <uses-permission android:name="android.permission.INTERNET"/> </manifest>
As for the other mentioned file, which looks like this:
> <?xml version="1.0" encoding="utf-8"?> <manifest
> xmlns:android="http://schemas.android.com/apk/res/android"
> package="com.csdcorp.speech_to_text" >
>
> <uses-sdk android:minSdkVersion="21" />
>
> </manifest>
changing the 21 to 16 is reverted after the attempt to run this app.
How to handle this
1. technically, ie. what is the workaround for this minSDK limitation - one that is at least worth trying?
2. A step back, if there are version issues, how do you do to avoid them?
Thanks a lot
Edit the build.gradle file in app folder. Search defaultConfig, edit the minSdkVersion from 16 to 21.
File path.
android\app\build.gradle
An AAR library already uses com.google.guava.
If an app includes the following in its build.gradle:
api 'com.google.guava:guava:27.0-android'
Building the app generates the following error:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: ...
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: com.google.common.util.concurrent.internal.InternalFutures
If I do not include "api 'com.google.guava:guava:27.0-android'", the app can be built, but it has runtime error of java.lang.NoClassDefFoundError when it reaches the point of using the Guava method: Iterables.find
I had to update to version 27.0.1, at the time of writing they still haven't updated the README with this new version.
implementation 'com.google.guava:guava:27.0.1-android'
Since Guava 27.0, ListenableFuture is located in separate artifact, see the announcement. You can try two things (one at a time):
Exclude "listenablefuture" module (group "com.google.guava") and build your project again.
I don't know the AAR specifics, but it could be that 27.0-android doesn't work with AAR, so you should try 26.0-android instead.
I'm having a problem trying to use Appodeal with GooglePlayServices and Unity3d, here are my steps:
1 - Import the GooglePlayServices package;
2 - Import the Appodeal package
3 - Compile the project.
Then the error:
CommandInvokationFailure: Gradle build failed
...
...
FAILURE: Build failed with an exception.
What went wrong
Execution failed for task ':transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
...
...
This is about the android 65k methods limits. Right?
There is a way to solve this without having to use Proguard or export my project to Android Studio?
Thank You.
Thanks to Appodeal Support, i solved my problem:
1- Remove mmedia and inmobi folders from plugins/android.
2- Before initiliazation code of sdk, write:
Appodeal.disableNetwork("mmedia");
Appodeal.disableNetwork("inmobi");
my project was built perfectly after that
When I use these two plugins in ionic 1
cordova-plugin-fcm
cordova-plugin-googleplus
then this type of error occurs:
BUILD FAILED in 1s
11 actionable tasks: 1 executed, 10 up-to-date
Error: /home/idiosys/ionic/seeCheckFolder/SeeCheck/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.
What can be the reason for these errors?
remove fcm, google plus
then install firebase plugin (https://ionicframework.com/docs/native/firebase/)
then install google plus.
remove and re-add android platform. it is work with me (ionic2).
Note: firebase contains notification functions , also with badge number : )
1 - Remove the entry from build.gradle:
// PLUGIN GRADLE EXTENSIONS START
apply from: "cordova-plugin-fcm/poc-FCMPlugin.gradle"
// PLUGIN GRADLE EXTENSIONS END
2 - specify proper versions for all other dependencies in project.properties file like:
cordova.system.library.1=com.google.firebase:firebase-core:10.2.0
cordova.system.library.2=com.google.firebase:firebase-messaging:10.2.0
cordova.system.library.3=com.google.android.gms:play-services-auth:10.2.0
cordova.system.library.4=com.google.android.gms:play-services-identity:10.2.0
3 - And bottom of build.gradle file add this line:
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
4 - Comment out all content of poc-fcmplugin.gradle file and instead of apply plugin: com.google.gms.googleservices.GoogleServicesPlugin use:
apply plugin: 'com.google.gms.google-services'
5 - Add classpath for google services in build.gradle classpath section like:
classpath 'com.google.gms:google-services:3.0.0'
Please refer to below mentioned app and make sure android dependencies are correct .
https://market.ionicframework.com/starters/ionic-google-plus-fcm-and-ad-banner
implementation "com.google.android.gms:play-services-auth:10.+"
implementation "com.google.android.gms:play-services-identity:10.+"
implementation "com.android.support:support-annotations:27.+"
implementation "com.google.firebase:firebase-core:10.+"
implementation "com.google.firebase:firebase-messaging:10.+"
implementation "com.google.android.gms:play-services-base:10.+"
implementation "com.google.android.gms:play-services-ads:10.+"