ReallySmallSoftware / cordova-plugin-firebase-crashlytics

Google Firebase Crashlytics Cordova plugin
Other
33 stars 80 forks source link

Unable to build android project #35

Open mukeshsolanki opened 4 years ago

mukeshsolanki commented 4 years ago

Any idea why i keep getting this exception in my android app. All I'm doing is just adding the module

Caused by: com.android.build.gradle.internal.crash.ExternalApiUsageException: groovy.lang.MissingPropertyException: Could not get unknown property 'assemble' for task ':capacitor-cordova-android-plugins:assembleDebug' of type org.gradle.api.Task.

andresomargonzalez commented 4 years ago

any update for this one ?

ivy-digital commented 4 years ago

Any update???

filipano commented 4 years ago

Still not working ...

SubhajitSarkar commented 4 years ago

I faced the same issue with the PhoneGap project.

Here are the steps that I followed and it worked for me:

  1. Remove android platform from the project phonegap platform remove android

  2. Re-install the platform (currently it is ) phonegap platform add android

  3. Install the plugin as they specified in the doc: https://github.com/ReallySmallSoftware/cordova-plugin-firebase-crashlytics

  4. Update the confix.xml android-minSdkVersion version to 195. Update the project global build.gradle dependencies with

    classpath 'com.android.tools.build:gradle:3.3.0'
    classpath 'com.google.gms:google-services:4.3.3'
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.0'
  5. Add allprojects>repositories if not added under project global build.gradle google()

  6. Check and update if the version of the installed dependencies in the "project.properties"

    filecordova.system.library.1=com.google.firebase:firebase-messaging:11.+
    cordova.system.library.2=com.google.firebase:firebase-core:11.+
    cordova.system.library.3=com.google.firebase:firebase-analytics:11.+
  7. Update the Gradle wrapper version if needed from (if the build gives you error due to wrapper unavailability/not compatible):

    \platforms\android\cordova\lib\builders\ProjectBuilder.js
    var distributional = ....... 
    from gradle-4.10.3-all.zip to gradle-<SUGGESTED_VERSION_BY_THE_SYSTEM>-all.zip
  8. I used classpath of the buildscript with  classpath 'com.android.tools.build:gradle:3.3.0'

After making the required changes on the project build the project and run on a real device. Then check the "FirebaseCrashlytics" instance and initialize it. Once done log some errors and force crash the app. And then restart the app. Now you will see the crash list in the Firebase console.

During this, you have to register your app in the firebase console and you have to add the google-services.json file in your app.

If you are using FCM for a push notification (https://github.com/phonegap/phonegap-plugin-push) then remove the plugin and reinstall the same.

Now my project contains:

λ phonegap platform list
Installed platforms:    
  android 8.1.0         
  ios 5.1.1             
λ phonegap plugin list
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-firebase-crashlytics 1.0.0 "Cordova Firebase Crashlytics Plugin"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-support-google-services 1.3.2 "cordova-support-google-services"
phonegap-plugin-multidex 1.0.0 "Multidex"
phonegap-plugin-push 2.3.0 "PushPlugin"          

Thank you

saayalac commented 4 years ago

Same problem with capacitor, tried SubhajitSarkar's suggestion but I didn't make it

deveshmishra34 commented 4 years ago

Facing same problem with capacitor ....any update??

Duboox commented 4 years ago

any update please?

ReallySmallSoftware commented 4 years ago

I have released a new version with updated dependencies, removing the original Fabric dependencies. Please try again and see how it goes.