我尝试将newrelic插件集成到我的项目中,但总是崩溃
我包括
dependencies {
classpath "com.newrelic.agent.android:agent-gradle-plugin:4.+"
}
和
apply plugin: 'new relic'
和
compile 'com.newrelic.agent.android:android-agent:4.+'
java.lang.NoClassDefFoundError: com.newrelic.agent.android.instrumentation.AsyncTaskInstrumentation
at com.kogi.hitchradiolib.HitchBaseApplication$1.handleMessage(HitchBaseApplication.java:677)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5586)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:0)
这应该有效
buildscript{
dependencies{
classpath 'com.newrelic.agent.android:agent-gradle-plugin:4.+'
}
}
apply pluggin: 'newrelic'
dependencies {
compile 'com.newrelic.agent.android:android-agent:4.+'
}