PayPal手机支付前preSS结帐库示例应用程序给我的NoClassDefFoundError异常 [英] Paypal Mobile Express Checkout Library sample app gives me NoClassDefFoundError Exception

查看:138
本文介绍了PayPal手机支付前preSS结帐库示例应用程序给我的NoClassDefFoundError异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我测试示例应用程序与Android的移动防爆preSS结帐库。

I'm testing the sample app for Mobile Express Checkout Library with Android.

我收到 java.lang.NoClassDefFoundError的:com.paypal.android.pizza.ResultDelegate

该错误是在这Pizza.java行: PayPal.fetchDeviceReferenceTokenWithAppID(这一点,APPID,服务器,新ResultDelegate());

The error is on this Pizza.java line: PayPal.fetchDeviceReferenceTokenWithAppID(this, appID, server, new ResultDelegate());

我很困惑,我没有找到有关谷歌的错误信息的任何,也对贝宝和x.com常见问题,所以我不知道如何解决它。

I'm confused, i didnt find any info about that error on google, and also on the faq on paypal and x.com, so i don't know how to solve it.

我只是打开的示例code项目,并执行它。

I simply opened the sample code project and executed it.

这是链接到项目和库:的https://www.x.com/sites/default/files/PayPal_MECL_1.0_Android-Developer-Package_0.zip

This is the link to the project and the library: https://www.x.com/sites/default/files/PayPal_MECL_1.0_Android-Developer-Package_0.zip

推荐答案

有只有三个理由,你永远不会得到这个错误:

There are only three reasons you will ever get this error:


  1. 类真的不存在。如果您使用的是来自官方的例子code和得到这个,请确保您有库的最新版本

  2. 您还没有添加罐子构建路径。要解决此问题,右键单击Eclipse中的罐子,也构建路径►添加到构建路径。

  3. 您的罐子是不是在 /库文件夹中。这种情况发生时,你已经添加了罐子到构建路径,但ADT的新版本需要它是在 /库。把它放在那里,它会自动被添加到构建路径。如果不是,尝试通过做一个干净的构建蚂蚁干净或项目►在清洁月食。

  1. The class genuinely doesn't exist. If you are using code from an official example and getting this, make sure you have the latest build of the library
  2. You have not added the jar to your build path. To fix this, right click on the jar in Eclipse, and do Build Path ► Add to Build Path.
  3. Your jar is not in the /libs folder. This happens when you have added the jar to the build path, but newer versions of ADT need it to be in /libs. Put it there and it will automatically be added to the build path. If it isn't, try doing a Clean build via ant clean or Project ► Clean in eclipse.

大多数情况下,出现这样的错误,因为ADT的新版本要求所有外部罐是在libs文件夹。

Mostly, such errors occur because newer versions of the ADT require all external jars to be in the libs folder.

通过查看您链接到这个项目,我可以看到在项目根贝宝罐子。相反,尝试移动到 /库文件夹中。这应该解决您的问题。

By looking at the project you linked to, I can see the paypal jar in the project root. Instead, try moving it into a /libs folder. This should solve your problem.

这篇关于PayPal手机支付前preSS结帐库示例应用程序给我的NoClassDefFoundError异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆