UnityAds - Not working from services and big issue with asset store

Hello,

As detailed here:

Currently, if I enable the Ads from services, they do not work at all.

If I download from asset store, UnityAds.aac is conflicting with other android libraries.
I am getting the error:

trouble writing output: Too many field references: 67237; max is 65536.
You may try using --multi-dex option.

I do not have that many libraries included in the project and all of them are up-to date.

Hi,

You’ve reached the Android method count limit - which SDKs / plugins do you have integrated in your project?

Perhaps you might want to consider removing some unused / big plugins from the project?

By trial and error, I managed to get it down to 2 conflicting aar included: “support-v4-23.4.0.aar” and UnityAds.aar
If I remove either one, the app compiles but of course does not work as expected (Facebook SDK is bundled with support-v4-23.4.0.aar)

As for the plugins I am using:

  • OneSignal
  • Facebook
  • Google Play services
  • Adcolony
  • Chartboost
  • Native Plugins.

PS: They are all working fine, I added and removed previous plugins before without getting into that error.

The only solution so far is not to use UnityAds.

Hi,

It should work when removing / disabling importing the latest of these two libraries. You should be able to use the other library with both libraries that have this dependency. Have you tested this yet?

You might still have the method count issue after this. Are you using all of these libraries?

Well sure I am using them, I would expect any game on the store to use at least those plugins if not more.

So I had to swap some stuff around, basically FB SDK would still work for login if you remove “support-annotations-23.4.0.jar” and “support-vector-drawable-23.4.0.aar”.

So by removing those libraries, the compilation works including having UnityAds.

But as a better alternative, is there a timeline for solving this multi-dex issue (probably have the android build internally us multi-dexing).

Thanks