gradlew installDebug failed with error "Applying the Firebase Crashlytics plugin to a library project is unsupported."
hashtd opened this issue · 3 comments
Ionic 5 using @ionic-native/firebase-crash
Android 9+ SDK v29
`
Crashlytics was applied to an android-library project.
Android-library support is currently an incubating feature.
Contact us at https://firebase.google.com/support/troubleshooter/contact with any issues.
FAILURE: Build failed with an exception.
-
Where:
Script '..../node_modules/cordova-plugin-firebase-crash/src/android/build.gradle' line: 13 -
What went wrong:
A problem occurred evaluating script.
Failed to apply plugin [class 'com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin']
Applying the Firebase Crashlytics plugin to a library project is unsupported. It should only be applied to the application module of your project to enable automatic upload of obfuscation mapping files for your application.
-
Try:
Run with --stacktrace option to get the stack trace. Run with --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 435ms
`
This happens also when bundleRelease
I'm using ionic capacitor ^2.4.1
After running ionic cap sync
In android/capacitor.build.gradle file
dependencies {
...
implementation "com.google.firebase:firebase-crashalytics:17.5.+"
}
apply from '.../node_modules/cordova-plugin-firebase-crash/src/android/build.gradle' is added
gradlew bundleRelease output
Welcome to Gradle 5.6.4!
Here are the highlights of this release:
- Incremental Groovy compilation
- Groovy compile avoidance
- Test fixtures for Java projects
- Manage plugin versions via settings script
For more details see https://docs.gradle.org/5.6.4/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Configure project :capacitor-cordova-android-plugins
Crashlytics was applied to an android-library project.
Android-library support is currently an incubating feature.
Contact us at https://firebase.google.com/support/troubleshooter/contact with any issues.
FAILURE: Build failed with an exception.
* Where:
Script 'D:\a\1\s\src\lifehook\node_modules\cordova-plugin-firebase-crash\src\android\build.gradle' line: 13
* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin [class 'com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin']
> Applying the Firebase Crashlytics plugin to a library project is unsupported. It should only be applied to the application module of your project to enable automatic upload of obfuscation mapping files for your application.
* 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 2m 3s
Error: The process 'D:\a\1\s\src\testproject\android\gradlew.bat' failed with exit code 1
at ExecState._setResult (D:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\2.175.0\node_modules\azure-pipelines-task-lib\toolrunner.js:816:25)
at ExecState.CheckComplete (D:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\2.175.0\node_modules\azure-pipelines-task-lib\toolrunner.js:799:18)
at ChildProcess.<anonymous> (D:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\2.175.0\node_modules\azure-pipelines-task-lib\toolrunner.js:721:19)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Socket.<anonymous> (internal/child_process.js:351:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:509:12)
No test result files matching D:\a\1\s\**\TEST-*.xml were found, so publishing JUnit test results is being skipped.
##[error]Error: The process 'D:\a\1\s\src\testproject\android\gradlew.bat' failed with exit code 1
Finishing: gradlew bundleRelease