Juan Story
Posts: 0
Joined: Wed Nov 05, 2014 8:31 pm

Cannot build app using SocialSharing plugin

Hello,

I've been trying to integrate the latest SocialSharing Phonegap plugin to my app without success. Link for reference: https://github.com/EddyVerbruggen/Soc...

The android build always fails with the same error (image attached), and i think it has something to do with the SocialSharing.java import of "android.annotation.SuppressLint;"
I have already checked solutions like this: http://stackoverflow.com/questions/14...
So i raised the android minimum SDK version in all places i could find to the highest possible, but it didn't solve it.

I've already checked most of the threads in appery (such as this one: https://getsatisfaction.com/apperyio/...) and i haven't found one that works or is updated.

Also i've managed to make it work with this branch, but i would like to use the newer one as it offers more features:
https://github.com/EddyVerbruggen/Soc...

So, is there something that i'm missing that leads to this biuld error or is the plugin not supported in appery or something else?

Thanks in advance

Image

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Cannot build app using SocialSharing plugin

Hello,

1) Your SDK for Android can not be higher then 4.4
2) Your mistake is a typical one, please follow the exact instructions of this tutorial
http://devcenter.appery.io/documentat...
3) Debugging and 3rd party plugin integration is something outside the scope http://devcenter.appery.io/support-po... of our support.

Juan Story
Posts: 0
Joined: Wed Nov 05, 2014 8:31 pm

Cannot build app using SocialSharing plugin

Hello Alena,

1) Im setting the highest in appery general settings that is 4.2.x
2)I've already followed that tutorial and successfully installed the Toast plugin as well as the 2.0 branch of the Social Sharing plugin with no issues. My problem only arises with the latest release of the SocialSharing plugin, and i'm pretty sure it is because of the "android.annotation.SuppressLint" as the error shown in the build process references line 3 of the java file which is that import.
3) Yeah i know that, i was not intending for you to debug the code. One can asume that the code is already correct as it is unedited from an official plugin repo which is tested and working by a lot of people.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Cannot build app using SocialSharing plugin

Hello Juan,

Sorry for the radio silence here.
[quote:]it is unedited from an official plugin repo which is tested and working by a lot of people.[/quote]
It doesn't guarantee that you have integrated the plugin successfully, because Appery.io project structure in the source for Android differs from simple plugin on github, due to libraries and technologies being used in Appery.io platform

Juan Story
Posts: 0
Joined: Wed Nov 05, 2014 8:31 pm

Cannot build app using SocialSharing plugin

Ok, then is this extension not compatible with appery? Or what can i do to fix this issue?
Because there is not much of an integration process, and by simply placing the java file in a sub folder of the appery "src" folder of the project causes this build error.

I'm just trying to figure out if this can work with appery. If its not supported please just be open about it so i don't waste more time on a dead-end road.

Thanks

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Cannot build app using SocialSharing plugin

Hello!

Yes, because before making a build of your app, compiler runs the project and searching for errors and exceptions.

Juan Story
Posts: 0
Joined: Wed Nov 05, 2014 8:31 pm

Cannot build app using SocialSharing plugin

Ok... i think i'll stick with the 2.x branch until the appery compiler can parse all the imports in this plugin version.

Juan Story
Posts: 0
Joined: Wed Nov 05, 2014 8:31 pm

Cannot build app using SocialSharing plugin

Just for anyone else facing a similar problem.
I managed to resolve it by removing the offending java code.

The errors thrown by the appery build process pointed only to an import (android.annotation.SuppressLint) and several lines of a function that was using that import.
I removed the import and the contents of that function, that luckily wasn't of critical importance to the plugin main functionality ( just some code to handle the clipboard in a specific case, from what i understand).

So now the plugin is working... except for that piece of functionality, which for now i don't really care about.

Anyhow, it would be best if this kind of issues would be resolved in the appery build process.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Cannot build app using SocialSharing plugin

Hi Juan,

Thanks for this update.

Regards.

hb condo
Posts: 0
Joined: Mon Jul 14, 2014 7:38 am

Cannot build app using SocialSharing plugin

Juan, thanks for postin about this. I've successfully used this SocialSharing plugin with Appery but as of their latest update, the plugin stopped working. I received the same build error but resolved it using the advise posted here:

https://getsatisfaction.com/apperyio/...

I can successfully build now but unfortunately the plugin still does not work :(
I even commented out the SuppressLint import and method in the java code as mentioned above but receive the error 'cannot call method shareViaEmail of undefined' when attempting to call the plugin. Any other ideas on how to get the plugin working?

Return to “Issues”