1

I am doing work on social network under guidence of github project on it. I have main activity named SocialMainActivity that import OAuth as lib and OAuth import facebook lib, facebool lib import google-play-service and support-v7 as lib.

  • I delete multiple jar file and store all jar file in facebook lib,

so success to remove error multiple dex file, on jar file. But after remove that error i face new error

Class not found SocialMainActivity on path: DexPathList etc. 

I so much googling and follow all that step but i not success ed. So any one can help me to solve this error?

image of main activity propertiesenter image description here

Main activity properties and projects structures

Zoe
  • 27,060
  • 21
  • 118
  • 148
Nirav Mehta
  • 1,715
  • 4
  • 23
  • 42

1 Answers1

3

Solution 1:

You changed your libs or .jar files. So Restart the Eclipse.

Solution 2:

Right click on your project and select properties. The "Properties for " panel will open. From the menu on the left go to Java Build Path -> Order and Export . From the list below uncheck the box next to "Android Dependencies". Finally clean your project and run.

Solution 3:

Create a new project and copy everything from this one to the new one.

Solution 4:

View your class SocialMainActivity again. Check that if its activity, did you declared it in your manifest file as oppose to fragment. Check the layout xml of this class. Android layout text is case sensitive so check everything carefully.

EDIT:

Multiple dex files define Lcom/facebook/AccessToken$SerializationProxyV1;

Well, it depends if you build the Facebook SDK only, or you've included it as Library for your own Android project (I suppose that's the case). If you have some JAR's within your project folder (added as JARs to your project), remove them and copy them somewhere outside your project root, then add them again as the external jars.

Check - conversion-to-dalvik-format-failed-facebook-accesstokenserializationproxyv1.

Community
  • 1
  • 1
sjain
  • 23,126
  • 28
  • 107
  • 185
  • @NiravMehta - No, Uncheck the `Android Dependencies`. Clean the project and run the app. – sjain Jul 18 '14 at 12:24
  • i try all in lib and main project also to check and un check but no solution, if multiple dex file or class not found on it occures,i sure i have problem in importing lib but but dont know where. – Nirav Mehta Jul 18 '14 at 12:30
  • @NiravMehta - I doubt you either did some wrong imports or messed up with same support library versions causing conflicts. If such, you better have to do carefully from scratch and check hand to hand. Also check - http://stackoverflow.com/questions/10866431/android-activity-classnotfoundexception-tried-everything?rq=1 – sjain Jul 18 '14 at 12:33
  • i tried first theee no solution, now tried fourth :) – Nirav Mehta Jul 18 '14 at 12:45
  • Put the check mark for all the files in `Java Build Path -> Order and Export`. I see that you have none checked. Then do `Project -> Clean` and run app. – sjain Jul 18 '14 at 13:06
  • if i checked that then i got error of multiple dex files – Nirav Mehta Jul 18 '14 at 13:20
  • like : Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/facebook/AccessToken$SerializationProxyV1; – Nirav Mehta Jul 18 '14 at 13:24
  • @NiravMehta - The idea is to include all the libraries that are used by your project without duplicates. So check mark them all three but ensure they aren't imported anywhere else other then this otherwise multiple dalwik exception will come again. – sjain Jul 18 '14 at 13:41