相关疑难解决方法(0)

使用gradle的新Relic Android代理错误

我有一个使用gradle构建系统的项目,我愿意为它添加New Relic监控.

该项目(包括New Relic)在Linux(Fedora 20)上运行良好,但不会在我的Mac开发系统上构建,并给出错误说明Agent JAR loaded but agent failed to initialize.

以下是错误的完整日志:

Dev-1:test 0x4d$ ./gradlew clean
> Configuring > 1/2 projects > :appobjc[4437]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
[newrelic.error] Agent startup error
java.lang.IllegalAccessException: Can not set static final java.lang.Object field java.util.logging.Logger.treeLock to com.newrelic.agent.compile.RewriterAgent$InvocationDispatcher
    at sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:73)
    at sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:77)
    at sun.reflect.UnsafeQualifiedStaticObjectFieldAccessorImpl.set(UnsafeQualifiedStaticObjectFieldAccessorImpl.java:77)
    at java.lang.reflect.Field.set(Field.java:741)
    at com.newrelic.agent.compile.RewriterAgent.createInvocationDispatcher(RewriterAgent.java:772)
    at com.newrelic.agent.compile.RewriterAgent.premain(RewriterAgent.java:137)
    at com.newrelic.agent.compile.RewriterAgent.agentmain(RewriterAgent.java:102)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) …
Run Code Online (Sandbox Code Playgroud)

java android gradle newrelic

9
推荐指数
1
解决办法
3313
查看次数

由于newrelic异常,应用程序在onCreate中崩溃

我已经使用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 …
Run Code Online (Sandbox Code Playgroud)

android newrelic android-studio

6
推荐指数
1
解决办法
1343
查看次数

标签 统计

android ×2

newrelic ×2

android-studio ×1

gradle ×1

java ×1