Open SiddiquiImran opened 7 years ago
Hey @SiddiquiImran, I had the same issue. I suppose that just like me, you found the package on npm. Well, this is a different plugin.
Run $ cordova plugin add cordova-plugin-x-socialsharing
and you should be good to go. If you look closely, you will see that you tried to install cordova-plugin-socialsharing
, without the -x-
in the middle.
@alpanayotov, yes you are right. Thanks
Used xml file: <?xml version="1.0" encoding="UTF-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" id = "com.test.tyt" versionCode = "1" version = "1.0" >
When i tired to add this plugin in phonegap build it;'s giving following error:
Build Date: 2017-05-19 06:20:24 +0000
PLUGIN OUTPUT
Fetching plugin "cordova-plugin-device@1.1.4" via npm Installing "cordova-plugin-device" at "1.1.4" for android Fetching plugin "cordova-plugin-geolocation@2.4.1" via npm Installing "cordova-plugin-geolocation" at "2.4.1" for android Fetching plugin "cordova-plugin-compat" via npm Installing "cordova-plugin-compat" at "1.1.0" for android Fetching plugin "cordova-plugin-inappbrowser@1.6.1" via npm Installing "cordova-plugin-inappbrowser" at "1.6.1" for android Fetching plugin "cordova-plugin-globalization@1.0.5" via npm Installing "cordova-plugin-globalization" at "1.0.5" for android Fetching plugin "cordova-plugin-network-information@1.3.1" via npm Installing "cordova-plugin-network-information" at "1.3.1" for android Fetching plugin "cordova-plugin-splashscreen@4.0.1" via npm Installing "cordova-plugin-splashscreen" at "4.0.1" for android Fetching plugin "cordova-plugin-media@2.4.1" via npm Installing "cordova-plugin-media" at "2.4.1" for android Fetching plugin "cordova-plugin-file" via npm Installing "cordova-plugin-file" at "4.3.3" for android Dependent plugin "cordova-plugin-compat" already installed on android.
The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml.
If this is a new application no changes are required.
If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:
to config.xml in order for the application to find previously stored files.
Dependent plugin "cordova-plugin-compat" already installed on android. Fetching plugin "cordova-plugin-dialogs@1.3.1" via npm Installing "cordova-plugin-dialogs" at "1.3.1" for android Fetching plugin "cordova-plugin-screen-orientation@1.4.2" via npm Installing "cordova-plugin-screen-orientation" at "1.4.2" for android Fetching plugin "cordova-plugin-whitelist@1.3.1" via npm Installing "cordova-plugin-whitelist" at "1.3.1" for android
Fetching plugin "cordova-plugin-socialsharing@4.3.81" via npm Installing "cordova-plugin-socialsharing" at "4.3.81" for android
COMPILE OUTPUT
Configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. :preBuild UP-TO-DATE :preDebugBuild UP-TO-DATE :checkDebugManifest :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugNdk UP-TO-DATE :CordovaLib:compileLint :CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugProguardFiles :CordovaLib:packageDebugRenderscript UP-TO-DATE :CordovaLib:checkDebugManifest :CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugRenderscript :CordovaLib:generateDebugResValues :CordovaLib:generateDebugResources :CordovaLib:packageDebugResources :CordovaLib:compileDebugAidl :CordovaLib:generateDebugBuildConfig :CordovaLib:mergeDebugShaders :CordovaLib:compileDebugShaders :CordovaLib:generateDebugAssets :CordovaLib:mergeDebugAssets :CordovaLib:processDebugManifest :CordovaLib:processDebugResources :CordovaLib:generateDebugSources :CordovaLib:incrementalDebugJavaCompilationSafeguard :CordovaLib:compileDebugJavaWithJavac :CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForDebug :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug :CordovaLib:mergeDebugJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForDebug :CordovaLib:transformNative_libsWithSyncJniLibsForDebug :CordovaLib:bundleDebug :prepareProjectCordovaLibUnspecifiedDebugLibrary :prepareDebugDependencies :compileDebugAidl :compileDebugRenderscript :generateDebugBuildConfig :mergeDebugShaders :compileDebugShaders :generateDebugAssets :mergeDebugAssets :generateDebugResValues :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources :generateDebugSources :incrementalDebugJavaCompilationSafeguard :compileDebugJavaWithJavac :compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). /project/src/nl/xservices/plugins/SocialSharing.java:19: error: package org.apache.http.util does not exist import org.apache.http.util.ByteArrayBuffer; ^ /project/src/nl/xservices/plugins/SocialSharing.java:420: error: cannot find symbol ByteArrayBuffer baf = new ByteArrayBuffer(5000); ^ symbol: class ByteArrayBuffer location: class SocialSharing /project/src/nl/xservices/plugins/SocialSharing.java:420: error: cannot find symbol ByteArrayBuffer baf = new ByteArrayBuffer(5000); ^ symbol: class ByteArrayBuffer location: class SocialSharing Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /project/src/org/apache/cordova/file/AssetFilesystem.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors :compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':compileDebugJavaWithJavac'.
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.924 secs Error: /project/gradlew: Command failed with exit code 1 Error output: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. /project/src/nl/xservices/plugins/SocialSharing.java:19: error: package org.apache.http.util does not exist import org.apache.http.util.ByteArrayBuffer; ^ /project/src/nl/xservices/plugins/SocialSharing.java:420: error: cannot find symbol ByteArrayBuffer baf = new ByteArrayBuffer(5000); ^ symbol: class ByteArrayBuffer location: class SocialSharing /project/src/nl/xservices/plugins/SocialSharing.java:420: error: cannot find symbol ByteArrayBuffer baf = new ByteArrayBuffer(5000); ^ symbol: class ByteArrayBuffer location: class SocialSharing Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /project/src/org/apache/cordova/file/AssetFilesystem.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':compileDebugJavaWithJavac'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. at ChildProcess.whenDone (/project/cordova/node_modules/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)