0

嗨,我收到以下异常:06-10 10:53:36.643: E/AndroidRuntime(10415): java.lang.NoClassDefFoundError: com.applovin.sdk.AppLovinSdk我导入了外部库并将该库复制粘贴到 /libs 文件夹。但我仍然收到此错误。我将 lib 导入为 :import com.applovin.sdk.AppLovinSdk;并且程序位于这一行 : AppLovinSdk.initializeSdk(this);。我错过了什么?

错误前的行:

06-10 10:53:36.603: I/dalvikvm(10415): Could not find method com.applovin.sdk.AppLovinSdk.initializeSdk, referenced from method sk.wblade.psy.GalleryActivity.onCreate
06-10 10:53:36.603: W/dalvikvm(10415): VFY: unable to resolve static method 230: Lcom/applovin/sdk/AppLovinSdk;.initializeSdk (Landroid/content/Context;)V
06-10 10:53:36.603: D/dalvikvm(10415): VFY: replacing opcode 0x71 at 0x0003
06-10 10:53:36.613: I/dalvikvm(10415): Could not find method com.applovin.adview.AppLovinInterstitialAd.show, referenced from method sk.wblade.psy.GalleryActivity.onResume
06-10 10:53:36.613: W/dalvikvm(10415): VFY: unable to resolve static method 229: Lcom/applovin/adview/AppLovinInterstitialAd;.show (Landroid/app/Activity;)V
06-10 10:53:36.613: D/dalvikvm(10415): VFY: replacing opcode 0x71 at 0x0012
06-10 10:53:36.633: D/AndroidRuntime(10415): Shutting down VM
06-10 10:53:36.633: W/dalvikvm(10415): threadid=1: thread exiting with uncaught exception (group=0x40a9b228)
4

2 回答 2

2

项目右键单击属性-> Java BuildPath 选择库并按照以下步骤添加外部.jar。

转到 Project->Properties->Java Build Path,然后选择 Order and export 选项卡。将外部 .jar 库设置为选中并将其置于列表顶部。并清理和重建..它适用于大多数情况

于 2013-06-10T09:00:57.667 回答
1

ADT 22 中有一个错误。如果您使用它,您必须在 Preferences/Java Build Path 的 Order and Export 选项卡中检查 Android Private Libraies。

您可以在此处详细了解此内容:

升级到 ADT 22 后,库不再添加到 APK

于 2013-06-10T09:02:41.537 回答