I\'m working on a project with ionic. After I installed the Facebook Plugin I\'m not able to build the project for android anymore!
The command
ionic
Adding this to project.properties will resolve all of the V4 error instances.
cordova.system.library.7=com.android.support:appcompat-v7:27.1.0
i solved same problem in my app the problem is
com.android.support:support-v4:+
com.android.support:support-v4:+ file exist in /platforms/android/phonegap-facebook-plugin/Myapp-FacebookLib/libs
if you want only used facebook and Push Notification Plugin then simply commit the line in project.properties
#cordova.system.library.1=com.android.support:support-v4:+
Best way to solved this problem
1 First delete the android-support-v4.jar from /platforms/android/phonegap-facebook-plugin/Myapp-FacebookLib/libs
2 second step create a file name build-extras.gradle in /platforms/android/phonegap-facebook-plugin/Myapp-FacebookLib/
and type in file
dependencies {
compile "com.android.support:support-v4:+" }
Push- and Facebook Plugins are conflicting by using different versions of android support libraries.
See my answer to this question: Android Studio cordova Push plugin
Multiple dex files error is raised because of using multiple support jar files in the ionic / cordova project
you need to change build.gradle under platforms/android
find the below line
apply plugin:'com.android.application'
after add these below lines
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
We had the same problem with Google Analytics plugin with One Signal plugin and finally it was resolved by installing the plugins in different order;
This was our config:
Cheers!