Ich verfolge diese Android-Checkout für In-App-Käufe. Ich habe einfach ein Gefühl dafür, wie es funktioniert. Ich habe eine ziemlich gute Idee, wie alles funktioniert, aber ich bekomme dieses Problem.java.lang.ClassCastException: android.app.Application kann nicht umgewandelt werden
Das ist meine Sku Aktivitätsklasse und ich erhalte eine Fehlermeldung, die mit in der CheckoutApplication Klasse
final Billing billing = CheckoutApplication.get(this).getmBilling();
mCheckout = Checkout.forActivity(this, billing); //Line with error
mCheckout.start();
//Separate class
//This is where the other error is
public static CheckoutApplication get(Activity activity)
{
return (CheckoutApplication) activity.getAcitivty();
}
Ich bin nicht sicher, entspricht, was den Fehler verursacht. Jede Hilfe ist willkommen. Dank
bei com.purchases.inapppurchases.CheckoutApplication.get (CheckoutApplication.java:37) bei com.purchases.inapppurchases.SkuActivity.onCreate (SkuActivity.java:68)
Das ist es dank fixiert. –