libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
225 stars 82 forks source link

NoClassDefFoundError: org.onepf.oms.OpenIabHelper$Options$Builder #50

Closed LombrozoV closed 9 years ago

LombrozoV commented 9 years ago

Hello, I am just learning to work with libGdx and gdx-pay.And i have the following problem:

java.lang.NoClassDefFoundError: org.onepf.oms.OpenIabHelper$Options$Builder at com.badlogic.gdx.pay.android.openiab.PurchaseManagerAndroidOpenIAB.install(PurchaseManagerAndroidOpenIAB.java:219) at com.badlogic.gdx.pay.PurchaseSystem.install(PurchaseSystem.java:168) at com.altinntech.slots.services.PlatformResolver.initializeIAP(PlatformResolver.java:29) at com.altinntech.slots.AndroidResolver.(AndroidResolver.java:28) at com.altinntech.slots.MainActivity.onCreate(MainActivity.java:185)

In the build.gradle i addded:

     project(":android") {
apply plugin: "android"

configurations { natives }

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}

dependencies {
    compile project(":core")
    compile 'com.facebook.android:facebook-android-sdk:4.4.0'
    compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
    compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
    compile "com.badlogicgames.gdxpay:gdx-pay-android:$gdxpayVersion"
    compile "com.badlogicgames.gdxpay:gdx-pay-android-openiab:$gdxpayVersion"

// compile "com.badlogicgames.gdxpay:gdx-pay-android-openiab:$gdxpayVersion:library" // compile "com.badlogicgames.gdxpay:gdx-pay-android-ouya:$gdxpayVersion" // compile "org.onepf:openiab:0.9.8.7" compile fileTree(dir: 'libs', include: ['*.jar']) } }

if I add ... compile "org.onepf:openiab:0.9.8.7" then see the error

Error:Gradle: Execution failed for task ':android:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value 2

Please tell me, what am I doing wrong?

tobloef commented 8 years ago

Did you ever find out what you did wrong? Sharing your solution could help other people searching for an answer to this problem (including me).

Maktos commented 8 years ago

I'm having the same problem!

nikolamk commented 8 years ago

Me to the same problem