0

How can I add a Cordova plugin to an Android Cordova project which I am already working on in Android Studio?

If I add from command line it gives an error that Cordova project cannot be built.

S_S
  • 1,276
  • 4
  • 24
  • 47
  • What plugin you're adding ? – Hardik Vaghani Mar 20 '17 at 10:32
  • http://ngcordova.com/docs/plugins/barcodeScanner/ – S_S Mar 20 '17 at 10:38
  • did you tried adding platform again after installing plugin ? – Hardik Vaghani Mar 20 '17 at 10:40
  • No, when I try to add the plugin, the command itself initiates the build command too. – S_S Mar 20 '17 at 11:07
  • What is error log ? – Hardik Vaghani Mar 20 '17 at 11:33
  • FAILURE: Build failed with an exception. * Where: Build file '/Users/cdac/App/platforms/android/build.gradle' line: 20 * What went wrong: A problem occurred evaluating root project 'android'. > Failed to apply plugin [id 'com.android.application'] > Minimum supported Gradle version is 3.3. Current version is 2.14.1. If using the gradle wrapper, try editing the distributionUrl in /Users/cdac/App/gradle/wrapper/gradle-wrapper.properties to gradle-3.3-all.zip – S_S Mar 20 '17 at 11:34
  • seems to be there is problem with SDK. Try to update to latest and try again. – Hardik Vaghani Mar 20 '17 at 12:12
  • @Sumit you gotta upgarde your gradle. Check out this links - http://stackoverflow.com/questions/36565993/unable-to-build-an-android-gradle-project-for-a-cordova-project/37431572#37431572 http://stackoverflow.com/questions/37367247/how-to-sync-gradle-with-apache-cordova/37371948#37371948 – Gandhi Mar 20 '17 at 14:53

0 Answers0