EddyVerbruggen / SocialSharing-PhoneGap-Plugin

šŸ‘Øā€ā¤ļøā€šŸ’‹ā€šŸ‘Ø Cordova plugin to share text, a file (image/PDF/..), or a URL (or all three) via the native sharing widget
MIT License
1.78k stars 907 forks source link

Android build failing on build.phonegap. #749

Open stripathix opened 7 years ago

stripathix commented 7 years ago

IOS and windows build are successful but Android build is failing.

Inside Config.xml I have added:

<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="14" />
<preference name="StatusBarBackgroundColor" value="#000000" />
<plugin name="cordova-plugin-device" source="npm" spec="~1.1.1" />
<plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.1" />
<plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2" />
<plugin name="cordova-plugin-wkwebview-engine" spec="https://github.com/driftyco/cordova-plugin-wkwebview-engine.git" />
<plugin name="cordova-plugin-x-socialsharing" spec="https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git" />

Below is the LOG: Build Date: 2017-01-11 15:14:11 +0000

PLUGIN OUTPUT

Fetching plugin "cordova-plugin-device@~1.1.1" via npm Installing "cordova-plugin-device" at "1.1.4" for android Fetching plugin "cordova-plugin-splashscreen@~3.2.1" via npm Installing "cordova-plugin-splashscreen" at "3.2.2" for android Fetching plugin "cordova-plugin-statusbar@~2.1.2" via npm Installing "cordova-plugin-statusbar" at "2.1.3" for android Fetching plugin "https://github.com/driftyco/cordova-plugin-wkwebview-engine.git" via git clone Using shallow clone Repository "https://github.com/driftyco/cordova-plugin-wkwebview-engine.git" checked out to git ref "master" at "ba242fc". Installing "cordova-plugin-wkwebview-engine" at "1.1.1-dev" for android Fetching plugin "https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git" via git clone Using shallow clone Repository "https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git" checked out to git ref "master" at "c045445". Installing "cordova-plugin-x-socialsharing" at "5.1.3" 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:37: error: package android.support.v4.content does not exist import android.support.v4.content.FileProvider; ^ /project/src/nl/xservices/plugins/SocialSharing.java:249: error: cannot find symbol fileUri = FileProvider.getUriForFile(webView.getContext(), "com.socialsharing.provider", new File(fileUri.getPath())); ^ symbol: variable FileProvider Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors :compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 2.373 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:37: error: package android.support.v4.content does not exist import android.support.v4.content.FileProvider; ^ /project/src/nl/xservices/plugins/SocialSharing.java:249: error: cannot find symbol fileUri = FileProvider.getUriForFile(webView.getContext(), "com.socialsharing.provider", new File(fileUri.getPath())); ^ symbol: variable FileProvider Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors

FAILURE: Build failed with an exception.

stripathix commented 7 years ago

Found that version 5.1.2 Works so i think something wrong with latest 5.1.3