question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: cordova-plugin-intercom 10.2.0 fails to compile for Android with Capacitor 3

See original GitHub issue

Bug Report

Please note that while the steps to reproduce are identical to closed issue #5019, the fix implemented in #5019 does not actually result in a successful build, it just reveals a different error.

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 3.2.4
  @capacitor/core: unknown
  @capacitor/android: 3.2.4
  @capacitor/ios: 3.2.4

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 3.2.4
  @capacitor/android: 3.2.4
  @capacitor/core: 3.2.4

[success] Android looking great! 👌

Platform(s)

Android

Current Behavior

A blank Ionic project compiles correctly, until cordova-plugin-intercom is added. Then the build in Android Studio fails with error message noted below.

Steps to reproduce:

Create a new Ionic project with ionic start, using the ‘blank’ app template. Add the android platform: ionic cap add android. Sync, ionic cap sync, open ionic cap open android, and build in Android Studio, it is successful.

Now, install cordova-plugin-intercom, per https://ionicframework.com/docs/native/intercom.

npm install cordova-plugin-intercom
npm install @ionic-native/intercom
ionic cap sync

Now in Android Studio, the build fails:

A problem occurred configuring project ':capacitor-cordova-android-plugins'.
> com.android.builder.errors.EvalIssueException: Library projects cannot set applicationId. applicationId is set to 'capacitor.android.plugins' in default config.

Expected Behavior

I expect a successful build.

Granted, this is almost certainly an issue with cordova-plugin-intercom, but this page suggests letting you know when a cordova plugin is incompatible… so you’re welcome? 😉

Code Reproduction

https://github.com/abesiemsen/cordova-plugin-intercom-fails

Other Technical Details

npm --version output: 6.14.15

node --version output: v14.18.0

ionic info output:

Ionic:

   Ionic CLI                     : 6.17.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.8.2
   @angular-devkit/build-angular : 12.1.4
   @angular-devkit/schematics    : 12.1.4
   @angular/cli                  : 12.1.4
   @ionic/angular-toolkit        : 4.0.0

Capacitor:

   Capacitor CLI      : 3.2.4
   @capacitor/android : 3.2.4
   @capacitor/core    : 3.2.4
   @capacitor/ios     : not installed

Utility:

   cordova-res : not installed globally
   native-run  : 1.4.1

System:

   NodeJS : v14.18.0 (/usr/local/Cellar/node@14/14.18.0_1/bin/node)
   npm    : 6.14.15
   OS     : macOS Big Sur

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jcesarmobilecommented, Oct 12, 2021

glad it worked

BTW, there is a community intercom plugin for Capacitor https://github.com/capacitor-community/intercom

0reactions
ionitron-bot[bot]commented, Nov 24, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cordova-plugin-intercom 10.1.0 fails to compile for Android ...
The latest version of cordova-plugin-intercom (10.1.0) fails to compile for android with Capacitor 3. Steps to reproduce: Create a new Ionic ...
Read more >
Build error in Android Studio for Ionic/Capacitor project when ...
I came across an error building the app in Android Studio after I added a new package to the project. I've created a...
Read more >
Troubleshooting Android Issues | Capacitor Documentation
Cleaning and rebuilding can fix a number of build issues: ... This error occurs when some Cordova or Capacitor plugin has old android...
Read more >
"ionic capacitor run android" fails with latest @capacitor ...
When I run ionic capacitor run android with the more recent @capacitor package versions in “package.json”, I get an error:
Read more >
Ionic android buil fails - RevenueCat Community
Hi, so we are using ionic capacitor framework. Everything works fine on IOS but we have problem with Android. So when we start...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found