Closed aberkowski closed 7 years ago
Have you enabled proguard?
Dependencies seems to be correct, so I think its probably proguard?
The suggested Proguard on wiki start page seems to be not mentioning critical configuration, this page does: https://github.com/libgdx/gdx-pay/wiki/Proguard
If this page resolves your problem, can you please make a pull-request to update gdx-pay README.md? Thanks!
It is a debug version where I'm not using proguard. To be sure I added this line to proguard:
-keep public class com.badlogic.gdx.pay.android.googleplay.AndroidGooglePlayPurchaseManager { public protected *; }
I added even this line:
-keep class com.badlogic.** {*;}
without succes.
Can you create a minimal sample project? This is such a project used to reproduce another issue:
I'm using Eclipse - is Eclipse support .aar files? When I change the 'android-googleplay' dependency from '.aar' to '.jar' everything works fine...
I have never done any Android development in the pre-Gradle toolchain. So I don't know if aar is supposed to work.
Can you find out if there is some official documentation about aar support of Eclipse? If you find someone, we can extend README.md that eclipse users must use the jar
I cannot find any official documentation but there are some posts on the net about this problem, for example: https://commonsware.com/blog/2014/07/03/consuming-aars-eclipse.html . Some people writes that you have to extract .aar file and there is a 'classes.jar' file which can be used in the eclipse project. I extracted 'gdx-pay-android-googleplay.aar' file and there was 'classes.jar' file but it was smaller and different than original 'gdx-pay-android-googleplay.jar' file so I don't know it is true...
I think the 'gdx-pay-android-googleplay.jar' is an uberjar, containing all gdx-pay dependencies of android-googleplay.
@Berobasket Theoretically it is possible to "convert" aar for eclipse, however I propose to switch to Android Studio. It is much simpler :)
I don't want to switch to Android studio because now I'm able to manage projects for Android, iOS and desktop from one place. This is crucial for me
You mean libgdx desktop / iOS projects? We do so as wel, with Android Studio. As long as you use Gradle, you're fine.
I didn't know about it... So I think that it's time for a change ;)
@Berobasket AndroidStudio works good, to configure and debug desktop you have to setup it like this:
Ok, thanks a lot
I've changed IDE to Android Studio and now everything works fine. I have no more problems with AndroidGooglePlayPurchaseManager class. @keesvandieren and @centy thanks for help - Android Studio works great with Android, iOS and desktop projects :)
I'm getting an exception
in method
after updating gdx-pay to '0.10.3' version (from 0.5.0 version). I run game on real Android device connected to PC with USB cable. My build.gradle: