Upgraded to SDK version 17, now libraries don'

2019-05-30 08:47发布

So, I recently upgraded my Android SDK, and for some reason it seems to have broken Analytics. I'm getting the following error from LogCat, which seems to be key, but I can hardly imagine that they would have removed getInstance, so I'm at a bit of a loss. Any ideas?

Could not find method com.google.android.apps.analytics.GoogleAnalyticsTracker.getInstance, referenced from method 
03-22 06:30:44.341: W/dalvikvm(217): VFY: unable to resolve static method 117: Lcom/google/android/apps/analytics/GoogleAnalyticsTracker;.getInstance ()Lcom/google/android/apps/analytics/GoogleAnalyticsTracker;
03-22 06:30:44.341: W/dalvikvm(217): VFY:  rejecting opcode 0x71 at 0x005a

I've tried the following to resolve it:

  1. Remove the Analytics library, then put it back in.
  2. Perform a clean, then re-built the project.
  3. Remove the Analytics Library completely from my machine, then re-install it.
  4. Remove Eclipse plug-in and re-install.

None of this seems to work. I think what's happening is that the library isn't being included as a part of the ADK, but I'm not quite sure, so...

2条回答
淡お忘
2楼-- · 2019-05-30 09:16

ADT 17 changes how libraries are dealt with. Unfortunately, it doesn't handle this automatically when you upgrade, nor let you know before you try to run it. In order to fix this, you need to:

  1. Remove all things from the build path.
  2. Create a folder named libs.
  3. Place all of your library functions in this folder.

Do all of this, and your project should build fine.

查看更多
我想做一个坏孩纸
3楼-- · 2019-05-30 09:29

It's a problem with libraries in ADT17.

查看更多
登录 后发表回答