NoClassDefFoundError on apps that doesn't have newrelic installed
Asked Answered
P

8

9

I've installed newrelic for my android app using their guide for eclipse.

It is working ok on that app.

Now, if I create a simple hello world project i'm receiving a NoClassDefFoundError.

How can I solve this?

Thank you in advance.

I've already searched in all NewRelics Documentation and submited a ticket to them.

News From New Relic's team There are several users having the same issue.

There is not a way to reproduce the problem and there is not ETA yet.

Phocis answered 19/6, 2013 at 13:25 Comment(5)
If you are using Eclipse with the R22 tools, make sure that your project has the "Order & Export" portion of the build path set up properly: #16597469Sharmainesharman
@Sharmainesharman "Order & Export" is checked. I have one project working perfectly with New Relic installed. The problem is I'm not able to run any other project.Phocis
its a jar or a library project?Headstream
@B.TIger the simple hello world project that I'm trying to run is not a library project.Phocis
New Relic is continuing to try and track down the root cause of this issue. Would you mind sending [email protected] your Eclipse configuration? You can find it by going to About -> Installation Details -> Configuration. Just copy everything in this window and save it in a file so you can attach it to the ticket. Thanks so much!Yockey
G
6

New Relic was finally able to reproduce this issue and has fixed it as of version 2.444.0 and 3.199.0 (if you're running the beta version). To upgrade, just click Eclipse's "Check for updates" menu option. If you're still having the issue, please reach out to [email protected].

Greysun answered 26/11, 2013 at 19:5 Comment(0)
L
2

After reading and investigating into the matter here and all over the net it seems alot of people ran into this problem...
(which annoyed the hell out of me & wasted precious dev time),

This worked for me:

FIRST

In Eclipse, go to the Project properties -> Java Build Path.
Select the Order and Export Tab and Uncheck your third party jars.

NEXT

Other projects where I followed the same fix pattern, I got an error:

09-21 12:58:51.122: E/AndroidRuntime(27033): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.ndroidians.listfrag/com.ndroidians.listfrag.MainActivity}: java.lang.ClassNotFoundException: com.ndroidians.listfrag.MainActivity

After reading a few posts here I just went to manifest and reselected the activity in the GUI: AndroidManifest.xml -> Application tab -> Application Nodes -> MainActivity -> (Right hand side parameters) Name -> Browse -> Choose you activity again

That fixed other projects problems with newrelic.

newrelic people: maybe you should consider more then twice before releasing a component that meddles with android API, and causes alot of people anguish and time waist!!!

I have submitted several tickets since first installation of your component BUT I guess - in vain!

Leonilaleonine answered 21/9, 2013 at 11:14 Comment(0)
B
0

One possible solution: you may not be seeing the 'libs' directory appearing in your other applications in Eclipse. To fix this, just refresh the project (it's in the right-click menu) and the 'libs' directory will show.

Bregma answered 27/6, 2013 at 3:41 Comment(3)
Indeed. I'm not seeing libs directory in my other apps. But refreshing does not fix that. Any other thought?Phocis
I need co clarify: did you attempt to install New Relic from the right-click menu on these other apps?Yockey
Yes, I did. I've marked another answer which suggested to do that as valid. But I think that you cannot expect someone to integrate some lib to every project just to make it work with one.Phocis
T
0

I had the same issue. I solved with right-click menu => Install new relic. Then the application run perfectly

Tralee answered 18/7, 2013 at 15:21 Comment(2)
Your solution works but I really don't want to install new relic in an app in order to run. Nevertheless, I'm accepting it as valid solution.Phocis
I have the same issue and installing new relic works as suggessted here. What do I need to include new relic in proguard config?Dali
S
0

This issue is typically seen after upgrading to ADT 22, you may see "java.lang.NoClassDefFoundError" when attempting to run your project. This is because sometimes, when upgrading to ADT 22, the new Android Private Libraries is not checked in the Order and Export of your Java Build Path.

To fix this:

In Eclipse, click your project. Select File > Properties. Click Java Build Path > Order and Export. Check the box for Android Private Libraries, and click OK. Clean your project by selecting Project > Clean.

Saraisaraiya answered 23/9, 2013 at 18:38 Comment(0)
S
0

The simple solution is for each project with this error: right-click > Install new relic

Which is not ideal as it forces you to install New Relic in all your projects.

In my experience, there have been several problems with the New Relic Eclipse plugin which caused me to have to re-install Eclipse and the Android SDK and after that I get the "noclassdeffound" error as discussed here.

I'm using Ubuntu 13.10 (Saucy) with OpenJDK 7 running Eclipse Kepler 4.3 and Android SDK v23, all of which 64-bit software running on a brand new AMD FX 3.8ghz quad core machine with 8GB of RAM. Not sure how any of this related to this problem, however it is noteworthy that I was using the Oracle sun-7-jre for Java when New Relic was first installed, but changed it when there was an error saying I need the JDK installed after auto restarting. After doing this Eclipse crashed and would no longer run at all which is what forced me to re-install Eclipse.

Hope this helps someone with the same problem or one of the New Relic guys on here.

Generally I do not like how the New Relic plugin meddles with the Android API also.

Scimitar answered 14/11, 2013 at 20:7 Comment(0)
L
0

Step1->In Eclipse Go to Windows|Preferences under Startup/Shutdown disable the NewRelic plugin.

Make sure you restart Eclipse after the step 1 so the plugin unloads from memory

Landtag answered 18/11, 2013 at 22:27 Comment(0)
H
0

Unistalling New Relic from Eclipse Android Project

After removing New Relic sdk I faced the same error! My Admob ads didn't show up because of something New Relic plugin left behing!

I managed to get rid of that problem by using this method :

Project -> Properties -> Java Build Path -> Libraries (Tab)

I removed everything except for the Android (Android 4.4 in my case). Then I manually added the libraries I needed (Admob in my case). Did a clean and then build and thankfully it now works!

Bye Bye New Relic for ever!

Hedgerow answered 28/11, 2013 at 10:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.