1

I am getting the below error in com.google.firebase.firebase-perf plugin.

Caused by: java.lang.NoClassDefFoundError: android/support/v7/app/ActionBarActivity at com.google.firebase.perf.plugin.instrumentation.InstrumentationConfigFactory.setAppStartConfig(InstrumentationConfigFactory.java:70) at com.google.firebase.perf.plugin.instrumentation.InstrumentationConfigFactory.(InstrumentationConfigFactory.java:62) at com.google.firebase.perf.plugin.instrumentation.Instrument.(Instrument.java:34) at com.google.firebase.perf.plugin.FirebaseTransform.transform(FirebaseTransform.java:192) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:222) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:218) at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102) at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:213) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:168) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) ... 101 more Caused by: java.lang.ClassNotFoundException: android.support.v7.app.ActionBarActivity ... 120 more

I am using the following libs :

  • com.google.firebase:firebase-plugins:1.1.1
  • com.google.firebase:firebase-perf:11.0.4
  • Support lib 26.0.0
  • build tool version 26.0.1

*fyi : It is working fine below support lib 26

Tasneem
  • 793
  • 8
  • 24
  • Please file a bug report at https://firebase.google.com/support/contact/bugs-features/ It will help if you have a minimal project with source code that demonstrates the problem. I use all the same versions of everything, and I don't have any problems. – Doug Stevenson Aug 02 '17 at 17:32
  • We are similar issue firebase performace library. Were you able to find any solution? – Nishant Shah Aug 24 '17 at 18:48

2 Answers2

1

We were facing similar issue. It was one of the libraries which was causing this issue. That library was still using ActionBarActivity in their code. It worked fine after removing that library.

EDIT: Alternatively, you can create a proxy class in your project. Create a class named ActionBarActivity under same package name as it is there in support library and make it extend AppCompatActivity class.

Nishant Shah
  • 1,590
  • 1
  • 15
  • 25
  • I'm also facing this issue, but can't find ActionBarActivity in any of my libs. Which was the troublesome lib in your case? – Ishaan Garg Sep 18 '17 at 09:00
  • @IshaanGarg, it was conflict with my internal third party dependency. you can create dependency graph and check. – Tasneem Sep 18 '17 at 12:38
  • @Tasneem Sorry but what should I be looking for in the dependency graph? – Ishaan Garg Sep 19 '17 at 08:28
  • you can use gradle command for this, but it did not help me. I created demo project with all the dependencies and by removing them one by one :) I know its very tedious. Or if any way you are able to figure out which third party apk is using ActionBarActivity then you are done. – Tasneem Sep 22 '17 at 11:47
-1

https://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html

This class was deprecated in API level 24.2.0. Use AppCompatActivity instead.

Hui Yu
  • 66
  • 2