- Home /
UNEXPECTED TOP-LEVEL EXCEPTION class name does not match path
I've just upgraded from Unity 3 to 4 and now am unable to build with the error below. It notes that
class name (com/companyname/unity/ad/R$attr) does not match path (bin/com/companyname/unity/ad/R$attr.class)
They clearly don't match (class name is missing bin) but how is that fixed?
Full Error
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:\Program Files\Java\jdk1.7.0_55\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: class name (com/companyname/unity/ad/R$attr) does not match path (bin/com/companyname/unity/ad/R$attr.class)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:520)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
...
Answer by mhardy · May 09, 2014 at 10:14 PM
Fixed!
It was an old .jar sitting in the \Assets\Plugins\Android\ folder. I found it by simply searching for the string "companyname/unity/ad/" through all files. Deleted it and everything builds fine now.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Android Application Error Message 0 Answers
Getting build error CommandInvocationFailure 0 Answers
Game not working correctly in build mode? 0 Answers
Standalone CTD (Access Violation) - Making sense of "error.log" files? 0 Answers