Android (Fragments) - android-fragments

I installed bottom bar and sync I faced this problem:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 11 declared in library [com.roughike:bottom-bar:2.1.1] C:\Users\Gowtham\AndroidStudioProjects\Bottom_bar\app\build\intermediates\exploded-aar\com.roughike\bottom-bar\2.1.1\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.roughike.bottombar" to force usage
How can I solve this problem?

It clearly specify your one of library required minimum SdkVersion is 11 and you're using minSdkVersion 8. Change your minSdkVersion to 11 in your build.gradle file.
defaultConfig {
applicationId "com.ng.app"
minSdkVersion 11
targetSdkVersion 22
}
This override value of AndroidManifest.xml

Related

react-native build failed after installing admob module

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1001 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
> Configure project :react-native-firebase_admob
:react-native-firebase_admob package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/admob/package.json
:react-native-firebase_app package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/app/package.json
:react-native-firebase_admob:firebase.bom using default value: 26.3.0
:react-native-firebase_admob:ads.consent using default value: 1.0.6
:react-native-firebase_admob package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/admob/package.json
:react-native-firebase_admob:version set from package.json: 10.5.1 (10,5,1 - 10005001)
:react-native-firebase_admob:android.compileSdk using custom value: 29
:react-native-firebase_admob:android.targetSdk using custom value: 29
:react-native-firebase_admob:android.minSdk using custom value: 16
:react-native-firebase_admob:reactNativeAndroidDir /home/muhamed-kveshkshaano/suck/node_modules/react-native/android
> Configure project :react-native-firebase_app
:react-native-firebase_app package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/app/package.json
:react-native-firebase_app:firebase.bom using default value: 26.3.0
:react-native-firebase_app:play.play-services-auth using default value: 19.0.0
:react-native-firebase_app package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/app/package.json
:react-native-firebase_app:version set from package.json: 10.5.0 (10,5,0 - 10005000)
:react-native-firebase_app:android.compileSdk using custom value: 29
:react-native-firebase_app:android.targetSdk using custom value: 29
:react-native-firebase_app:android.minSdk using custom value: 16
:react-native-firebase_app:reactNativeAndroidDir /home/muhamed-kveshkshaano/suck/node_modules/react-native/android
> Task :react-native-firebase_app:compileDebugJavaWithJavac
> Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
37 actionable tasks: 29 executed, 8 up-to-date
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
/home/muhamed-kveshkshaano/.gradle/caches/transforms-2/files-2.1/820765fbb4c63d086027395fb7f0dacc/play-services-ads-lite-19.6.0/AndroidManifest.xml:27:5-38:15: AAPT: error: unexpected element <queries> found in <manifest>.
* 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 32s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use or override a deprecated API.
here is the error, the main problem is each i install admob module #react-native-firebase/admob, it throws this error after trying a lot i couldnt find any solution, it only happens after installing admob module except that it build well, anyone knows whats wrong with that module
I was with the same problem and it work for me
in android/app/build.gradle
defaultConfig {
...
multiDexEnabled true // added for admob problem
}
...
dependencies {
...
implementation "androidx.multidex:multidex:2.0.1" // fix firebaseAdmob
}
in android/build.gradle
dependencies {
classpath('com.android.tools.build:gradle:4.1.2')
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.3.3'
}
now open the android folder in Android Studio and wait for gradle will update
when finish the gradle update run npx react-native run-android
downgrade all the rnfirebase libraries that you are using to less than 10.0.0 (admob 7.6.11 and app 9.0.0), as I show in the image

FlutterFirebaseCorePlugin.java uses or overrides a deprecated API

Ok so I run my program without importing firebase core, firebase auth and cloud firestore, and my code runs just fine but I register my app with firebase and it still runs fine but as soon as I import Firebase_auth, Firebase_core and cloud_Firestore... I get the following error
Note: C:\appflutter\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.7.0\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\appflutter\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.16.0\android\src\main\java\io\flutter\plugins\firebase\firestore\streamhandler\TransactionStreamHandler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Cannot fit requested classes in a single dex file (# methods: 89543 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Please help me.
I was having the same problem today and I found the solution here on Github
First, get the latest versions of your dependencies from pub.dev
Current latest versions are these:
firebase_auth: ^0.20.0+1
firebase_core: ^0.7.0
Then run these 3 commands in the terminal:
$ flutter pub upgrade
$ flutter pub get
$ flutter clean
And then run your project
$ flutter run
This will hopefully help you.
Seems it is a bug in Firebase plugins: https://github.com/FirebaseExtended/flutterfire/issues/3876. However setting min SDK to 23 does not show the warning.
it worked for me to change my sdkVersion to 23:
just go to android>app>build.gradle and
change the minSdkVersion-line in defaultConfig{} to .. minSdkVersion 23
$ flutter pub get
Just Do it in your Terminal it will work
Enable multidex in android project & run again.
I am suggesting this according to the last part of the error message you've posted.
According to this guide: https://firebase.flutter.dev/docs/installation/android#enabling-multidex
However, if your minSdkVersion is set to 20 or lower, then you must use the multidex support library and make the following modifications to your app project
In android - app - build.gradel file
add - implementation 'com.android.support:multidex:1.0.3' in dependencies section
add - multiDexEnabled true in default config section enter image description here
enter image description here
Suffered the error of FlutterFirebaseCorePlugin.java uses or overrides a deprecated API. for two days.
finally solved it by changing minSdkVersion to 21 in app/build.gradle and run the app with flutter run --no-sound-null-safety.
Found that the error comes from the sound null safety implementation which grey lists all incompatible API
There are two issues here, -Xlint and multidex.
For -Xlint, #Sarib's solution worked for me and both the -Xlint errors disappeared after running flutter pub upgrade, flutter pub get and flutter clean. You can find them under Tools > Flutter in Android Studio if you are not familiar with Terminal.
For multidex, according to the Android Studio User Guide, multidex is enabled by default if your minSdkVersion is 21 or higher. While #Joshi suggests enabling multidex, I think it is simpler to update the minSdkVersion in android/app/build.gradle file to 21 or higher, rather than mess with more variables and adding more dependencies, assuming you're building an app that targets Android21 or higher.
For this error:
Note: locationInD\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
The solution I found was to replace this line in android/app/build.gradle:
implementation 'com.google.firebase:firebase-analytics-ktx'
with
implementation 'com.google.firebase:firebase-analytics'
For me i changed one of my implementation version from
implementation platform('com.google.firebase:firebase-bom:27.1.0') to
implementation platform('com.google.firebase:firebase-bom:26.6.0')
at the moment there are some bugs in this current version "27.1.0" and after running the application it worked
//To help someone my project needed this implementation for my ads #admob
change to minSdkVersion 24
in android/app/build.gradle
dependencies {
//add this in your dependencies
implementation "androidx.multidex:multidex:2.0.0"
}
then
$ flutter clean
$ flutter run
I had the same issue and combined two suggested fixes to get it to finally work:
minSdkVersion 21, change to 23
run "flutter pub upgrade"
= issues fixed!
To double-check what the fix was:
I also reverted back to 21 and invalidated + flutter clean and the issue appeared again. Then I changed to 23 and the warnings disappeared!
Check your minSDK, it works fine for 23

Getting proguard error on adding androidx biometric API ( "androidx.biometric:biometric:1.0.1")

I am getting following error on building release apk after adding androidx biometric api "androidx.biometric:biometric:1.0.1" in gradle file
Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
../release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
../release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
../release/values/values.xml:2853: error: resource android:attr/fontVariationSettings not found.
../release/values/values.xml:2854: error: resource android:attr/ttcIndex not found.
error: failed linking references.
I am using below mentioned sdk / tools version
buildToolsVersion = '28.0.3'
compileSdkVersion 28
targetSdkVersion 28
I am able to build debug apk and it works fine
I created my app following the instructions given here and here. And I have no problems creating and running a release APK. Here is the proguard section of my Gradle file
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

Flutter Firebase Auth not working in Ecommerce app

I was trying out the firebase auth but when I added the dependencies I got some error.
Could you please check what the error?
This is the error that I got :
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
Output: D:\App\dipam\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
And this the dependencies that I added to the pubspec.yaml file :
dependencies:
flutter:
sdk: flutter
carousel_slider: ^1.0.1
cloud_firestore: 0.8.2+3
firebase_auth: 0.6.6
google_sign_in: ^3.2.4
shared_preferences:
fluttertoast:
The error you posted is a result of conflicting android.support and AndroidX versions. Make sure you're targeting API version 28.
In your app's build.gradle check if you have following values set
android {
compileSdkVersion 28 // <-- Make sure you target API 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// ...
targetSdkVersion 28 // <-- You need to update this value as well, or you might encounter runtime errors
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
// ...
}
// ...
}
Also, make sure your not using old android.support libraries in your dependencies, but new AndroidX packaged. Check this article for further references

SBT getting the classpath mixed up

I have a multi module project.
I have three sub projects. They have dependencies that pull in Guava 19.
I explicitly added Guava 21 as a dependency.
When I view the dependency graph I can see that Guava 19 was evicted by 21.
When I try to compile on the commandline it does not find method in Guava 21 because the classpath has 19 before 21.
Is this a bug ?

Resources