• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android GooglePlayServicesExtension is not abstract and does not override abstract method...

M

Moar.Of.Me

Guest
Hi!

Wanted to update an old game and boom - it won't compile for android.
Building for API level 28
GooglePlayServicesExtension version is 3.0.5. Tried both 3.0.1 and 3.0.8
I'm not using google reward videos.

How can I get rid of this problem?

W:\com.onetapcloser.dots_universe\src\main\AndroidManifest.xml:36:3-296:17 Warning:
application@android:label was tagged at AndroidManifest.xml:36 to replace other declarations but no other declaration present
W:\com.onetapcloser.dots_universe\src\main\AndroidManifest.xml:37:5-46:16 Warning:
activity#com.onetapcloser.dots_universe.RunnerActivity@android:label was tagged at AndroidManifest.xml:37 to replace other declarations but no other declaration present
:com.onetapcloser.dots_universe:processDebugResources
:com.onetapcloser.dots_universe:generateDebugSources
:com.onetapcloser.dots_universe:incrementalDebugJavaCompilationSafeguard
:com.onetapcloser.dots_universe:compileDebugJavaWithJavac
:com.onetapcloser.dots_universe:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
W:\com.onetapcloser.dots_universe\src\main\java\com\onetapcloser\dots_universe\GooglePlayServicesExtension.java:99: error: GooglePlayServicesExtension is not abstract and does not override abstract method onRewardedVideoCompleted() in RewardedVideoAdListener
public class GooglePlayServicesExtension extends RunnerSocial implements GoogleApiClient.ConnectionCallbacks,GoogleApiClient.OnConnectionFailedListener,RewardedVideoAdListener
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:com.onetapcloser.dots_universe:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':com.onetapcloser.dots_universe:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
 

chirpy

Member
You have to uncomment the onRewardedVideoCompleted method (should be there in 3.0.5 which uses google play services 11.8.0) inside GooglePlayServicesExtension.java, which is required for RewardedVideoAdListener interface (which gms2's extension class implements) after google play services 12.0.0 (the exact version is described in one of your extension's gradle manifest injection).

Google release notes:
2018‑03‑20
Rewarded video: Added the onRewardedVideoCompleted() callback method to RewardedVideoAdListener.
 
M

Moar.Of.Me

Guest
Thank you! That helped!
And pushed me to another issue:

> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/gson/FieldNamingPolicy$5.class

Gonna spend another evening googling )
 
M

Moar.Of.Me

Guest
Fixed it by adding
Code:
   configurations{
             all*.exclude module:'gson'  //Remove duplicate dependencies: gson
     }
into the build.gradle and adjusting minimum SDK to 19
 

chirpy

Member
I had also seen it when trying to mediate Vungle where I also had to remove duplicate gson that came with Vungle SDK. Why min SDK 19 though?
 
M

Moar.Of.Me

Guest
Had to build the game before falling asleep on my keyboard. The game didn't compile with lower SDK. But with turned off lint code analysis it did. With min SDK 16 . Game runs well though.

I don't know now if that's what was causing the issue but the two gson files in my project came with HeyZap extension. Gonna try removing them this evening and seeing if it works. Or might try updating the extension and see if it fixes the issue without adding new ones.
 

chirpy

Member
Had to build the game before falling asleep on my keyboard. The game didn't compile with lower SDK. But with turned off lint code analysis it did. With min SDK 16 . Game runs well though.
Makes sense. I'm building with 26/16/26. Though I have no idea why 27/28 just wouldn't build.. I've given up for now since I got AdMob mediation and test suite working for my tiny tiny player base.

I don't know now if that's what was causing the issue but the two gson files in my project came with HeyZap extension. Gonna try removing them this evening and seeing if it works. Or might try updating the extension and see if it fixes the issue without adding new ones.
The exclude module looks like it'll do the trick, (I'm not so familiar with gradle) no?

By the way, HeyZap support had gone with the wind for me. Email enquiries bounced back, sending to Fyber support gives no replies either. I can get ads, and the dashboard looks like it's running, but I see incorrect revenue sums in mediated networks (HeyZap reported >> received in Vungle) so I'm being paranoid and dropping HeyZap.
 
M

Moar.Of.Me

Guest
I have incorrect numbers too. And because Unity ads make 95% of my tiny ads revenue I'll try Unity ads extension for my next project.
 
Top