Giter Site home page Giter Site logo

Comments (4)

dpa99c avatar dpa99c commented on August 17, 2024

It looks to me as if an older version of the Firebase SDK has been pulled into your build causing my changes to update the plugin for the new Firebase SDK API to break your build.

Please post the dependencies of platforms/android/app/build.gradle so I can see what version is being pulled in - it should look somethine like this:

    // SUB-PROJECT DEPENDENCIES START
    implementation(project(path: ":CordovaLib"))
    implementation "com.google.android.gms:play-services-tagmanager:17.0.0"
    implementation "com.google.firebase:firebase-core:17.0.0"
    implementation "com.google.firebase:firebase-messaging:19.0.0"
    implementation "com.google.firebase:firebase-config:18.0.0"
    implementation "com.google.firebase:firebase-perf:18.0.0"
    implementation "com.google.firebase:firebase-auth:18.0.0"
    implementation "com.crashlytics.sdk.android:crashlytics:2.9.8"
    implementation "me.leolin:ShortcutBadger:1.1.22"
    // SUB-PROJECT DEPENDENCIES END

Also try these test case commands in your environment and confirm the result:

cordova create test io.cordova.firebase.test && cd test
cordova plugin add cordova-plugin-firebasex

curl https://raw.githubusercontent.com/dpa99c/cordova-plugin-firebase-test/master/www/google-services.json -o google-services.json
cordova platform add android@latest
cordova build android

from cordova-plugin-firebasex.

willnix86 avatar willnix86 commented on August 17, 2024

Ok, so looks like Cordova now builds it successfully but we have another issue.

First, the initially problem was having firebase-gradle-plugin installed as you suspected, so I removed that and made sure play-services-gradle was set to 17.0.0+

But now we have another problem. When I try to run/build the Android project in Android studio I get the following error:

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 19 declared in library [__tested_artifact__::CordovaLib] /Users/wnixon/br-projects/analytics-dhs/mobile-app/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 the following two preferences set in my config.xml, so not sure why I'm getting this issue?

from cordova-plugin-firebasex.

dpa99c avatar dpa99c commented on August 17, 2024

Looks like the minSDK has been set to 1 somehow but cordova-android@8 has a min SDK requirement of 19.
You can a look at your .gradle configs and AndroidManifest.xml to check where this has happened.

I would try rm -Rf platforms/android/ && cordova platform add android to re-add the platform.
If it occurs again after this, look at the plugins in your plugins/ directory for a cause.

Closing this as an issue though because this plugin is not directly responsible for that error (as can be seen from the test case).

from cordova-plugin-firebasex.

willnix86 avatar willnix86 commented on August 17, 2024

Thanks @dpa99c - I'll look into that further!

from cordova-plugin-firebasex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.