Open 94pos opened 7 years ago
In your build.gradle file in gradle scripts, verify the version what you given to dependencies { classpath 'com.android.tools.build:gradle:2.2.2' } and also check the link "https://repo1.maven.org/maven2/com/android/tools/build/gradle" and look for your gradle 2.2.2 version is available or not. If not there please change your code in build.gradle to dependencies { classpath 'com.android.tools.build:gradle:2.1.2' }
It is working for me.. :-)
D:\apptest\pos>cordova plugin add cordova-plugin-fcm Installing "cordova-plugin-fcm" for android ANDROID_HOME=D:\Android\sdk JAVA_HOME=C:\Program Files\Java\jdk1.8.0_111 Subproject Path: CordovaLib
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'android'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.674 secs Failed to install 'cordova-plugin-fcm':Error: cmd: Command failed with exit code 1 at ChildProcess.whenDone (D:\apptest\pos\platforms\android\cordova\node_modu les\cordova-common\src\superspawn.js:169:23) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) Error: cmd: Command failed with exit code 1