Closed MikhailAOstapenko closed 9 years ago
Hello.
Target platform: android-10
I guess you should use latest SDK to build library. Try building it with target platform 21, you should be able to specify it in project.properties
file.
EDIT: Oops, nevermind. I see you use openiab-0.9.8.2.jar. Let me think some more.
Did you by any chance recently update your JDK from 1.6 to 1.7?
Hello Roman,
Did you by any chance recently update your JDK from 1.6 to 1.7?
No, I did not.
Right now I have updated Android SDK Tools, Platform-tools and Build-tools to latest versions. And it's working now even with android-10 target. I think this issue is not actually related to OpenIAB and can be closed.
Thank you for your time.
Well, grad it worked out.
Hi guys,
First of all, thanks for your work. OpenIAB is very great lib.
I have integrated OpenIAB v.0.9.8.1 into my application and it's works very well for GooglePlay and SamsungApps billing. But when I update library to version 0.9.8.2 and higher - application crashes right on start up.
Here is log:
01-20 11:29:32.130: W/dalvikvm(30241): VFY: unable to find class referenced in signature (Lorg/onepf/oms/OpenIabHelper;) 01-20 11:29:32.130: E/dalvikvm(30241): Could not find class 'org.onepf.oms.appstore.googleUtils.SkuDetails', referenced from method com.mycompany.myapp.MyInAppBilling.getSkuDescription
01-20 11:29:32.138: E/AndroidRuntime(30241): FATAL EXCEPTION: main 01-20 11:29:32.138: E/AndroidRuntime(30241): java.lang.ExceptionInInitializerError 01-20 11:29:32.138: E/AndroidRuntime(30241): at com.mycompany.myapp.MyMainActivity.onCreate(MyMainActivity.java:75) 01-20 11:29:32.138: E/AndroidRuntime(30241): at com.mycompany.myapp.freetoplay.mob.TSNMainActivity.onCreate(TSNMainActivity.java:16) 01-20 11:29:32.138: E/AndroidRuntime(30241): at android.app.Activity.performCreate(Activity.java:5283) 01-20 11:29:32.138: E/AndroidRuntime(30241): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097) 01-20 11:29:32.138: E/AndroidRuntime(30241): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209) 01-20 11:29:32.138: E/AndroidRuntime(30241): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295) 01-20 11:29:32.138: E/AndroidRuntime(30241): at android.app.ActivityThread.access$700(ActivityThread.java:150) 01-20 11:29:32.138: E/AndroidRuntime(30241): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280) 01-20 11:29:32.138: E/AndroidRuntime(30241): at android.os.Handler.dispatchMessage(Handler.java:99) 01-20 11:29:32.138: E/AndroidRuntime(30241): at android.os.Looper.loop(Looper.java:175) 01-20 11:29:32.138: E/AndroidRuntime(30241): at android.app.ActivityThread.main(ActivityThread.java:5279) 01-20 11:29:32.138: E/AndroidRuntime(30241): at java.lang.reflect.Method.invokeNative(Native Method) 01-20 11:29:32.138: E/AndroidRuntime(30241): at java.lang.reflect.Method.invoke(Method.java:511) 01-20 11:29:32.138: E/AndroidRuntime(30241): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) 01-20 11:29:32.138: E/AndroidRuntime(30241): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) 01-20 11:29:32.138: E/AndroidRuntime(30241): at dalvik.system.NativeStart.main(Native Method) 01-20 11:29:32.138: E/AndroidRuntime(30241): Caused by: java.lang.NoClassDefFoundError: com.mycompany.myapp.MyInAppBilling$1 01-20 11:29:32.138: E/AndroidRuntime(30241): at com.mycompany.myapp.MyInAppBilling.(MyInAppBilling.java:40)
01-20 11:29:32.138: E/AndroidRuntime(30241): at com.mycompany.myapp.MyInAppBilling.(MyInAppBilling.java:28)
01-20 11:29:32.138: E/AndroidRuntime(30241): ... 16 more
My environment: Java version 1.7.0_25 Ant 1.9.2 Target platform: android-10
Also, I have a lot of strange warnings/errors when building app with ant like this: [dex] Pre-Dexing D:\myproject\libs\openiab-0.9.8.2.jar -> openiab-0.9.8.2-9df79f7ad668c1359b21a15baf4ca259.jar [dx] [dx] trouble processing: [dx] bad class file magic (cafebabe) or version (0033.0000) [dx] ...while parsing org/onepf/oms/OpenIabHelper$9.class [dx] ...while processing org/onepf/oms/OpenIabHelper$9.class [dx] [dx] trouble processing: [dx] bad class file magic (cafebabe) or version (0033.0000) [dx] ...while parsing org/onepf/oms/OpenIabHelper$1.class [dx] ...while processing org/onepf/oms/OpenIabHelper$1.class [dx] [dx] trouble processing: [dx] bad class file magic (cafebabe) or version (0033.0000) [dx] ...while parsing org/onepf/oms/Manifest$permission.class [dx] ...while processing org/onepf/oms/Manifest$permission.class [dx] [dx] trouble processing: [dx] bad class file magic (cafebabe) or version (0033.0000) [dx] ...while parsing org/onepf/oms/OpenIabHelper$4.class [dx] ...while processing org/onepf/oms/OpenIabHelper$4.class [dx] [dx] trouble processing: [dx] bad class file magic (cafebabe) or version (0033.0000) [dx] ...while parsing org/onepf/oms/OpenIabHelper$2.class [dx] ...while processing org/onepf/oms/OpenIabHelper$2.class
What I'm doing wrong?
Thanks.