Skip to content Skip to sidebar Skip to footer

D8: Program Type Already Present: Org.apache.cordova.buildhelper

While running $ ionic cordova build android the build fails. Tried to install the npm plugin cordova-android-support-gradle-release but got this issue: https://github.com/dpa99c/co

Solution 1:

Thanks! I also was able to fix this issue by deleting the following files:

  • PermissionHelper.java
  • BuildHelper.java

In this folder: ⁨platforms⁩ ▸ ⁨android⁩ ▸ ⁨app⁩ ▸ ⁨src⁩ ▸ ⁨main⁩ ▸ ⁨java⁩ ▸ ⁨org⁩ ▸ ⁨apache⁩

Solution 2:

I solved this by removing cordova-plugin-compat from my cordova project as it's deprecated and the functionality is now part of cordova for android.

This plugin is no longer being worked on as the functionality provided by this plugin is now included in cordova-android 6.3.0. You should upgrade your application to use version 1.2.0 of this plugin. It will detect whether or not the plugin is required based on the version of cordova-android your app uses.

Solution 3:

I was able to fix the issue by removing those duplicated .java classes from the CordovaLib sub project.

Post a Comment for "D8: Program Type Already Present: Org.apache.cordova.buildhelper"