我在libs文件夹中有GoogleAdMobAdsSdk-6.4.1.jar
,并且也在类路径中设置了它。我仍然收到以下错误。后来我收到ClassNotFound
错误。
02-21 22:40:31.975: I/dalvikvm(951): Failed resolving Lcom/package/class; interface 88 'Lcom/google/ads/AdListener;'
02-21 22:40:31.975: W/dalvikvm(951): Link of class 'Lcom/package/class;' failed
之前只有改变我才能将一些活动从应用程序转移到库。
此外,如果我删除AdListener接口及其重写方法,它可以正常工作。
答案 0 :(得分:6)
花了12个小时后,我能够自己解决问题。我在这里回答它,以便它对类似情况的人有用。
我忽略了以下警告
Found 2 versions of android-support-v4.jar in the dependency list,
but not all the versions are identical (check is based on SHA-1 only at this time).
All versions of the libraries must be the same at this time.
Versions found are:
Path: /App/libs/android-support-v4.jar
Length: 349252
SHA-1: 612846c9857077a039b533718f72db3bc041d389
Path: /App Library/libs/android-support-v4.jar
Length: 337562
SHA-1: 27c24d26e4c5d57976e6926367985548678e913c
我刚从app的lib文件夹中删除了android-support-v4.jar,并将其保存在库的lib文件夹中,错误消失了。