我已经使用Android Studio beta 0.8.2创建了一个Android应用程序,直到最后几天,当我开始运行此异常时,一切顺利:
07-24 14:50:11.044 1176-1176/com.vme.vme I/Crashlytics﹕ Initializing Crashlytics 1.1.11.10
07-24 14:50:11.764 2325-2325/system_process D/MobileDataStateTracker﹕ default: Broadcast received: android.intent.action.ANY_DATA_STATE apnType=default
07-24 14:50:11.769 2325-2325/system_process D/MobileDataStateTracker﹕ default: Received state=CONNECTED, old=CONNECTED, reason=(unspecified)
07-24 14:50:15.079 1176-1176/com.vme.vme W/Crashlytics﹕ Crashlytics initialization was not completed in the allotted time.
07-24 14:50:15.104 1176-1176/com.vme.vme I/dalvikvm﹕ Could not find method com.newrelic.agent.android.instrumentation.Instrumentation.openConnection, referenced from method com.vme.vme.model.network.httpClient.BasicRequestHandler.openConnection
07-24 14:50:15.104 1176-1176/com.vme.vme W/dalvikvm﹕ VFY: unable to resolve static method 30466: Lcom/newrelic/agent/android/instrumentation/Instrumentation;.openConnection (Ljava/net/URLConnection;)Ljava/net/URLConnection;
07-24 14:50:15.104 1176-1176/com.vme.vme D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0009
07-24 14:50:15.114 1176-1176/com.vme.vme I/dalvikvm﹕ Could not find method com.newrelic.agent.android.background.ApplicationStateMonitor.getInstance, referenced from method com.vme.vme.ui.activities_and_fragments.home.bases.VMEBaseActivity.onStart
07-24 14:50:15.114 1176-1176/com.vme.vme W/dalvikvm﹕ VFY: unable to resolve static method 30464: Lcom/newrelic/agent/android/background/ApplicationStateMonitor;.getInstance ()Lcom/newrelic/agent/android/background/ApplicationStateMonitor;
07-24 14:50:15.114 1176-1176/com.vme.vme D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0000
07-24 14:50:15.114 1176-1176/com.vme.vme I/dalvikvm﹕ Could not find method com.newrelic.agent.android.background.ApplicationStateMonitor.getInstance, referenced from method com.vme.vme.ui.activities_and_fragments.home.bases.VMEBaseActivity.onStop
07-24 14:50:15.114 1176-1176/com.vme.vme W/dalvikvm﹕ VFY: unable to resolve static method 30464: Lcom/newrelic/agent/android/background/ApplicationStateMonitor;.getInstance ()Lcom/newrelic/agent/android/background/ApplicationStateMonitor;
07-24 14:50:15.114 1176-1176/com.vme.vme D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0003
07-24 14:50:15.309 1176-1176/com.vme.vme D/AndroidRuntime﹕ Shutting down VM
07-24 14:50:15.309 1176-1176/com.vme.vme W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41797c80)
07-24 14:50:15.429 1176-1176/com.vme.vme E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.vme.vme, PID: 1176
java.lang.NoClassDefFoundError: com.newrelic.agent.android.background.ApplicationStateMonitor
at com.vme.vme.ui.activities_and_fragments.home.bases.VMEBaseActivity.onStart(VMEBaseActivity.java)
我从未在这个项目中使用过newrelic,我已经搜索了#re; newrelic"并且无法在整个项目中找到它。
我可以分享的事情:
请帮忙......
答案 0 :(得分:3)
如果您仍然在非NR应用程序中收到有关New Relic的消息,您可以转到〜/ .gradle / caches并将其删除。然后再次尝试上述步骤。
较新版本的gradle使用一个缓存New Relic工具的守护进程。所以这将停止守护进程并允许应用程序构建。
您还需要升级到最新版本的New Relic。 2.426.0背后有很多版本。转到此处:http://docs.newrelic.com/docs/releases/android
答案 1 :(得分:1)
为我修复的事情是从右键单击项目文件夹升级到最新的gradle版本2.1和android插件版本到0.13.3 - >模块设置
答案 2 :(得分:0)
如果您仍然在非NR应用程序中收到有关New Relic的消息,您可以转到项目目录并删除.gradle目录并重新构建项目。