Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

AIDL & openStore #27

Closed
Lakedaemon opened this issue Jul 13, 2015 · 4 comments
Closed

AIDL & openStore #27

Lakedaemon opened this issue Jul 13, 2015 · 4 comments

Comments

@Lakedaemon
Copy link

I'm getting this exception for yandexBillingProvider (looks like something is wrong related to AIDL).
Did I do someting wrong in my code ?
(I'm using the latest 0.4 artefacts from mavenCentral and I looked at trivialDrive to implement the skumaps..)

Caused by: java.lang.IllegalStateException: Couldn't extract Stub implementation from AIDL class.
at org.onepf.opfiab.billing.AidlBillingHelper.(AidlBillingHelper.java:101)
at org.onepf.opfiab.openstore.OpenStoreBillingHelper$OpenAppstoreHelper.(OpenStoreBillingHelper.java:211)
at org.onepf.opfiab.openstore.OpenStoreBillingHelper.(OpenStoreBillingHelper.java:56)
at org.onepf.opfiab.openstore.OpenStoreBillingProvider.(OpenStoreBillingProvider.java:84)
at org.onepf.opfiab.openstore.OpenStoreBillingProvider$Builder.build(OpenStoreBillingProvider.java:397)
at org.lakedaemon.android.InAppBuy.yandexBillingProvider(InAppBuy.kt:60)
at org.lakedaemon.android.InAppBuy.billingConfiguration(InAppBuy.kt:100)
at org.lakedaemon.dictionary.DictionaryApp.onCreate(DictionaryApp.kt:83)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4775)
            at android.app.ActivityThread.access$1600(ActivityThread.java:171)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1369)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5679)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
            at dalvik.system.NativeStart.main(Native Method)

@RomanZhilich
Copy link
Collaborator

Do you use proguard? I haven't update docs, you have to add AIDL services to proguard-rules if you do.
If you don't... Then it's something bad

@Lakedaemon
Copy link
Author

I'm using proguard (damn 65k method limits :/ ... any non trivial app that uses libraries suffers from it).

I don't have any experience with AIDL, I tried adding
-keep class org.onepf.oms.IOpenAppstore {;}
-keep class org.onepf.oms.IOpenInAppBillingService {
;}

but it didn't do the trick. What should I add to my proguard rules for it to work ?

@RomanZhilich
Copy link
Collaborator

Try this:

-keepattributes InnerClasses
-keep class org.onepf.oms.** {*;}

damn 65k method limits

Yea, you can try Multidex but it still kinda sux.

@Lakedaemon
Copy link
Author

It worked, thanks. I'm closing the issue
By the way : your work with openIAB and now opfIAB is superb. I like the new clean api...
I'll test openIAB in production with Google/Samsung/Amazon/some open stores with my next publication (next month)
And also, I tried multidex (had multidex on debug and proguard on release) but It slowed builds so much I removed it (especially since, with kotlin M12 my build tends to take 5mins :/)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants