Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Edo_F_
Beginner
142 Views

(URGENT) Cant Build Using Plugin Admob and OneSignal

someone can help me ? i cant build if i add both of plugin, admob and onesignal .. and success build if one of them deleted..

*sorry for my english

Tags (2)
0 Kudos
11 Replies
PaulF_IntelCorp
Employee
142 Views

Edo -- the mainstream version of the OneSignal plugin is not compatible with our build system, it requires the use of a plugin gradle script that our build system will ignore. There is a special PhoneGap Build branch of that plugin that should work better. You have to install it using the third-party plugin add feature of the Plugin Management tool, using this name:

onesignal-cordova-plugin-pgb-compat

You have to remove the regular version that was added using this name: onesignal-cordova-plugin and then add that special branch version that I show above.

Edo_F_
Beginner
142 Views

i mean , i cant use plugin onesignal and admob together ..

*im using : cordova-plugin-admobpro and onesignal pgb

PaulF_IntelCorp
Employee
142 Views

Edo -- must be some other issue. I created a blank template project and added both plugins to it and I am able to build the app with both plugins as part of my app. See the screenshots, below. Perhaps you are not using CLI 5.4.1?

Here's my summary build log:

Build Log

  • Building a Cordova 5.4.1 application.
  • Using platform cordova-android 5.0.0.
  • The application name is "forum-661069"
  • The package name is "xdk.intel.cordova.template.lite"
  • Preference android-signed set to true.
  • Application will be signed.
  • Using Crosswalk Embedded 16
  • Plugin "cordova-plugin-statusbar" (2.1.0) installed.
  • Plugin "cordova-plugin-device" (1.1.1) installed.
  • Plugin "cordova-plugin-splashscreen" (3.2.0) installed.
  • Plugin "cordova-plugin-extension" (1.5.1) installed.
  • Plugin "cordova-plugin-admobpro" (2.18.0) installed.
  • Plugin "onesignal-cordova-plugin-pgb-compat" (1.13.0) installed.
  • Plugin "cordova-plugin-whitelist" (1.2.1) installed.
  • Plugin "cordova-plugin-crosswalk-webview" (1.5.0) installed.
  • App name updated to [forum-661069]
  • Updated "minSdkVersion" with "14"
  • Updated "targetSdkVersion" with "21"
  • Updated "installLocation" to "auto"
  • Updated "versionCode" to "1"
  • Updated "versionName" to "0.0.1"
  • Added "debuggable" to "false"

Screen Shot 2016-07-11 at 4.01.59 PM.png

Screen Shot 2016-07-11 at 3.52.36 PM.png

Screen Shot 2016-07-11 at 3.52.02 PM.png

Screen Shot 2016-07-11 at 3.50.50 PM.png

 

Edo_F_
Beginner
142 Views

im still failed sir .

*edited.

i've tried to reinstall all plugin , admob and onesignal , and i can build w/o error. BUT , i saw one problem , i think thats onesignal cant work w/o android-support plugin ..

can u try with this plugin ?

 

onesignal-cordova-plugin-pgb-compat 

 

cordova-plugin-admobpro 

and

cordova-plugin-android-support-v4

 

PaulF_IntelCorp
Employee
142 Views

You should not need that last plugin, and you should definitely not be adding it manually, it is meant to be a "dependent plugin" that other plugins include automatically. It is causing a conflict with Android support libraries, because it adds some Android libraries manually (directly), whereas the other plugins add them by reference (indirectly). The latter method is preferred because it allows the build system to resolve multiple requests for the same library. The former does not allow the build system to figure this out, so if two libraries collide you will have a problem. Neither one of those plugins should be adding that support-v4 plugin, so if there is another plugin that is adding it, or you are adding it manually, that is the source of the conflict.

That manual add method is now (mostly) obsolete, because it was used to deal with some deficiencies in the older Cordova CLI releases. The Cordova project addressed those problems in the CLI 5.x releases (which are the version we currently support), but not all third-party plugins have been updated to be consistent with those changes. You may be using an old version of a plugin if you are not adding that plugin manually. If you are adding it manually, remove it from your project.

PaulF_IntelCorp
Employee
142 Views

Josh -- we are working on a build system that would allow us to support gradle scripts in plugins. It is still under construction and, unfortunately, I cannot say when it will become available.

Antonio_Za
Beginner
142 Views

@Paul and @Josh, I'm using the pgb onesignal plugin version, but the doc tells:

"This pgb-compat branch will continue to be updated but updates will stop to this branch near future once it has been fully deprecated."

So, I hope you would manage to fully port next versions of OneSignal plugin in XDK, it's really important in our apps.

Antonio_Za
Beginner
142 Views

As I supposed, the pgb version of OneSignal plugin stopped at the 2.0.6 version. How can we manage to use latest versions of OneSignal in XDK?
Please help, we currently are not able to use the pgb plugin due to a lack of "Google Play Services Library" using this configuration:


CLI 6.2.0

OneSignal pgb plugin 2.0.6

CW 19

I tried to use the versions 2.0.7 and 2.0.8 from the repo, but the build failed. Using the 2.0.6 the build is done, but the OneSignal dashboard tell me the app miss that library.

 

Edit: I successfully added the Google Play Services plugin and built the app. Anyway, the debug module is still giving me an error, I suppose I should skip it to continue using it.
My main issue is anyway the use of an old onesignal plugin version, I'd like to use the latest one.

 

 

 

PaulF_IntelCorp
Employee
142 Views

Antonio -- as you probably already know, we've deprecated the Debug tab, it will be retired in favor of using remote Chrome DevTools with a built app, so I wouldn't consider the Debug tab as part of your decision. If you find that you cannot build your app using our build service, your best bet will be to consider building locally, using Cordova CLI. See this post for some light instructions on how to go about doing that > https://software.intel.com/en-us/forums/intel-xdk/topic/685326#comment-1885369 <

Flemming_P_
Beginner
142 Views

Hi .. Had the same Issue

Josh from Onesignal made a new plugin for XDK  .. here it is works for me

https://github.com/OneSignal/OneSignal-Cordova-Dependencies-Compat

REGARDS
Flemming

 

 

 

Josh_K_1
Beginner
142 Views

I work at OneSignal. The compat version of our plugin is required since Intel XDK does not allow gradle scripts required by our main SDK. Our compat plugin does not enforce any dependencies to be as compatible as possible with other plugins / cordova forks, however this means the Google Play services library and Android Support library v4 must be added manually as it is required by OneSignal.

If you are using Crosswalk 16 or newer in your project you should omit the cordova-plugin-android-support-v4 plugin.

If you need to use Admob Pro with our SDK will need to use the following fork of it so it will include the extra parts of Google Play services needed by our SDK.

https://github.com/jkasten2/cordova-admob-pro

Unfortunately this is needed as https://github.com/floatinghotpot/google-play-services is not compatible with Ad Mob Pro.

Update:
Please use the following 2 plugins to use OneSignal in your app.

https://github.com/one-signal/OneSignal-Cordova-SDK.git#PGB-Compat
https://github.com/OneSignal/OneSignal-Cordova-Dependencies-Compat

@Paul F. Do you plan to add support for gradle scripts in the future? Our plugin needs it to assign some manifestPlaceholders that are need to be set so gradle can build with our native Android plugin. We also have a work around for the CB-10014 Cordova bug we would like to keep in case someone were to use our plugin with an older version of Cordova.

https://github.com/OneSignal/OneSignal-Cordova-SDK/blob/1.13.1/plugin.xml#L34

 

Reply