您好我得到以下异常:06-10 10:53:36.643: E/AndroidRuntime(10415): java.lang.NoClassDefFoundError: com.applovin.sdk.AppLovinSdk
我导入了外部lib,并将lib粘贴到/ 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)
答案 0 :(得分:2)
项目右键单击属性 - > Java BuildPath选择Library并添加外部.jar,请执行以下步骤。
转到Project-> Properties-> Java Build Path,然后选择Order and export选项卡。设置外部.jar库并将其放入列表顶部。并清理和重建..它适用于大多数情况
答案 1 :(得分:1)
ADT 22中存在错误。如果您使用此错误,则必须在“首选项/ Java构建路径”的“订单和导出”选项卡中查看Android私有图书馆。
您可以在此处详细了解:
Libraries do not get added to APK anymore after upgrade to ADT 22
答案 2 :(得分:1)
http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java)
此链接显示如何添加一个java路径,它将清除你的probs