Hi,
I already had a jar plugin to send sms from android mobile. Recently I imported facebook plugin into my unity project and only after then, I am getting dex conversion error. I did some research on this topic and ended up this conclusion that, I need to extend my other plugin from facebook activity Or I need to extend facebook plugin from other plugin activity. Right now I have no idea how to do this. I have never built any android JNI stuffs. Can somebody help me out?
Could you paste the error message you are getting?
Usually that would display which class is the one causing the conflict, and that may help pinpointing how to solve the issue.
hi,
the error code is:
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:\Program Files (x86)\Java\jdk1.7.0_55\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="E:/Android SDK/sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/ssd/shootwin/R$attr;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:685)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
at com.android.dx.command.dexer.Main.access$600(Main.java:78)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:229)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:596)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at SDKMain.main(SDKMain.java:129)
1 error; aborting
]
stdout[
processing archive bin\classes.jar...
processing com/unity3d/player/a$1.class...
processing com/unity3d/player/a$2.class...
processing com/unity3d/player/a$a.class...
processing com/unity3d/player/a.class...
processing com/unity3d/player/b.class...
processing com/unity3d/player/c$1.class...
processing com/unity3d/player/c$2.class...
processing com/unity3d/player/c.class...
processing com/unity3d/player/d.class...
processing com/unity3d/player/e$1.class...
processing com/unity3d/player/e$2.class...
processing com/unity3d/player/e.class...
processing com/unity3d/player/f.class...
processing com/unity3d/player/g.class...
processing com/unity3d/player/h.class...
processing com/unity3d/player/i.class...
processing com/unity3d/player/j.class...
processing com/unity3d/player/k$1.class...
processing com/unity3d/player/k.class...
processing com/unity3d/player/NativeLoader.class...
processing com/unity3d/player/l.class...
processing com/unity3d/player/PsmMainActivity.class...
processing com/unity3d/player/PsmUnityActivity.class...
processing com/unity3d/player/ReflectionHelper$1.class...
processing com/unity3d/player/ReflectionHelper$a.class...
processing com/unity3d/player/ReflectionHelper.class...
processing com/unity3d/player/m.class...
processing com/unity3d/player/n$1.class...
processing com/unity3d/player/n$2.class...
processing com/unity3d/player/n$3.class...
processing com/unity3d/player/n.class...
processing com/unity3d/player/o.class...
processing com/unity3d/player/p.class...
processing com/unity3d/player/UnityPlayer$1.class...
processing com/unity3d/player/UnityPlayer$2.class...
processing com/unity3d/player/UnityPlayer$3.class...
processing com/unity3d/player/UnityPlayer$4.class...
processing com/unity3d/player/UnityPlayer$5.class...
processing com/unity3d/player/UnityPlayer$6.class...
processing com/unity3d/player/UnityPlayer$7.class...
processing com/unity3d/player/UnityPlayer$8.class...
processing com/unity3d/player/UnityPlayer$9.class...
processing com/unity3d/player/UnityPlayer$10.class...
processing com/unity3d/player/UnityPlayer$11.class...
processing com/unity3d/player/UnityPlayer$12$1.class...
processing com/unity3d/player/UnityPlayer$12.class...
processing com/unity3d/player/UnityPlayer$13.class...
processing com/unity3d/player/UnityPlayer$14.class...
processing com/unity3d/player/UnityPlayer$15.class...
processing com/unity3d/player/UnityPlayer$16.class...
processing com/unity3d/player/UnityPlayer$17.class...
processing com/unity3d/player/UnityPlayer$18.class...
processing com/unity3d/player/UnityPlayer$a.class...
processing com/unity3d/player/UnityPlayer$b.class...
processing com/unity3d/player/UnityPlayer.class...
processing com/unity3d/player/UnityPlayerActivity.class...
processing com/unity3d/player/UnityPlayerNativeActivity.class...
processing com/unity3d/player/UnityPlayerProxyActivity.class...
processing com/unity3d/player/q.class...
processing com/unity3d/player/r$1.class...
processing com/unity3d/player/r.class...
processing com/unity3d/player/WWW.class...
processing org/fmod/FMODAudioDevice$a.class...
processing org/fmod/FMODAudioDevice.class...
processing org/fmod/a.class...
processing bin\classes\.\com\facebook\android\R$attr.class...
processing bin\classes\.\com\facebook\android\R$color.class...
processing bin\classes\.\com\facebook\android\R$dimen.class...
processing bin\classes\.\com\facebook\android\R$drawable.class...
processing bin\classes\.\com\facebook\android\R$id.class...
processing bin\classes\.\com\facebook\android\R$layout.class...
processing bin\classes\.\com\facebook\android\R$string.class...
processing bin\classes\.\com\facebook\android\R$style.class...
processing bin\classes\.\com\facebook\android\R$styleable.class...
processing bin\classes\.\com\facebook\android\R.class...
processing bin\classes\.\com\ssd\shootwin\R$attr.class...
processing bin\classes\.\com\ssd\shootwin\R$color.class...
processing bin\classes\.\com\ssd\shootwin\R$dimen.class...
processing bin\classes\.\com\ssd\shootwin\R$drawable.class...
processing bin\classes\.\com\ssd\shootwin\R$id.class...
processing bin\classes\.\com\ssd\shootwin\R$layout.class...
processing bin\classes\.\com\ssd\shootwin\R$string.class...
processing bin\classes\.\com\ssd\shootwin\R$style.class...
processing bin\classes\.\com\ssd\shootwin\R$styleable.class...
processing bin\classes\.\com\ssd\shootwin\R.class...
processing archive plugins\.\android-support-v4.jar...
ignored resource META-INF/MANIFEST.MF
processing android/support/v4/util/TimeUtils.class...
processing android/support/v4/util/MapCollections$MapIterator.class...
processing android/support/v4/util/LongSparseArray.class...
processing android/support/v4/util/CircularArray.class...
processing android/support/v4/util/ArrayMap.class...
processing android/support/v4/util/DebugUtils.class...
processing android/support/v4/util/LruCache.class...
processing android/support/v4/util/SimpleArrayMap.class...
processing android/support/v4/util/MapCollections$ValuesCollection.class...
processing android/support/v4/util/MapCollections$EntrySet.class...
processing android/support/v4/util/Pools$SimplePool.class...
processing android/support/v4/util/MapCollections$KeySet.class...
processing android/support/v4/util/ArrayMap$1.class...
processing android/support/v4/util/LogWriter.class...
processing android/support/v4/util/Pools$SynchronizedPool.class...
processing android/support/v4/util/MapCollections.class...
processing android/support/v4/util/Pools.class...
processing android/support/v4/util/MapCollections$ArrayIterator.class...
processing android/support/v4/util/SparseArrayCompat.class...
processing android/support/v4/util/ContainerHelpers.class...
processing android/support/v4/util/Pools$Pool.class...
processing android/support/v4/util/AtomicFile.class...
processing android/support/v4/widget/DrawerLayout$State.class...
processing android/support/v4/widget/SlidingPaneLayout$PanelSlideListener.class...
processing android/support/v4/widget/ExploreByTouchHelper$1.class...
processing android/support/v4/widget/DrawerLayout$SavedState$1.class...
processing android/support/v4/widget/SwipeRefreshLayout$OnRefreshListener.class...
processing android/support/v4/widget/SearchViewCompat$SearchViewCompatHoneycombImpl.class...
processing android/support/v4/widget/SlidingPaneLayout$SavedState$1.class...
processing android/support/v4/widget/EdgeEffectCompat$EdgeEffectImpl.class...
processing android/support/v4/widget/SearchViewCompat$SearchViewCompatHoneycombImpl$2.class...
processing android/support/v4/widget/SlidingPaneLayout$DragHelperCallback.class...
processing android/support/v4/widget/SwipeRefreshLayout.class...
processing android/support/v4/widget/SimpleCursorAdapter$CursorToStringConverter.class...
processing android/support/v4/widget/AutoScrollHelper$ClampedScroller.class...
processing android/support/v4/widget/ListPopupWindowCompat.class...
processing android/support/v4/widget/PopupMenuCompat$KitKatPopupMenuImpl.class...
processing android/support/v4/widget/ViewDragHelper.class...
processing android/support/v4/widget/SwipeRefreshLayout$BaseAnimationListener.class...
processing android/support/v4/widget/SlidingPaneLayout$SlidingPanelLayoutImplJB.class...
processing android/support/v4/widget/ResourceCursorAdapter.class...
processing android/support/v4/widget/SwipeRefreshLayout$3.class...
processing android/support/v4/widget/DrawerLayout$ChildAccessibilityDelegate.class...
processing android/support/v4/widget/SwipeRefreshLayout$2.class...
processing android/support/v4/widget/SearchViewCompatIcs$MySearchView.class...
processing android/support/v4/widget/AutoScrollHelper.class...
processing android/support/v4/widget/SearchViewCompat$SearchViewCompatImpl.class...
processing android/support/v4/widget/ScrollerCompat.class...
processing android/support/v4/widget/DrawerLayout$LayoutParams.class...
processing android/support/v4/widget/EdgeEffectCompatIcs.class...
processing android/support/v4/widget/SearchViewCompatHoneycomb$2.class...
processing android/support/v4/widget/SearchViewCompat$OnCloseListenerCompat.class...
processing android/support/v4/widget/SwipeRefreshLayout$1.class...
processing android/support/v4/widget/DrawerLayout$EdgeGravity.class...
processing android/support/v4/widget/CursorFilter.class...
processing android/support/v4/widget/ListPopupWindowCompat$BaseListPopupWindowImpl.class...
processing android/support/v4/widget/ScrollerCompat$ScrollerCompatImplIcs.class...
processing android/support/v4/widget/ViewDragHelper$Callback.class...
processing android/support/v4/widget/SearchViewCompat$SearchViewCompatStubImpl.class...
processing android/support/v4/widget/BakedBezierInterpolator.class...
processing android/support/v4/widget/SlidingPaneLayout.class...
processing android/support/v4/widget/SlidingPaneLayout$DisableLayerRunnable.class...
processing android/support/v4/widget/ViewDragHelper$2.class...
processing android/support/v4/widget/DrawerLayout$ViewDragCallback$1.class...
processing android/support/v4/widget/ContentLoadingProgressBar$1.class...
processing android/support/v4/widget/ContentLoadingProgressBar.class...
processing android/support/v4/widget/SlidingPaneLayout$AccessibilityDelegate.class...
processing android/support/v4/widget/SearchViewCompat$SearchViewCompatHoneycombImpl$1.class...
processing android/support/v4/widget/SearchViewCompat$OnQueryTextListenerCompat.class...
processing android/support/v4/widget/EdgeEffectCompat$EdgeEffectIcsImpl.class...
processing android/support/v4/widget/DrawerLayout$DrawerListener.class...
processing android/support/v4/widget/SearchViewCompatHoneycomb$1.class...
processing android/support/v4/widget/AutoScrollHelper$ScrollAnimationRunnable.class...
processing android/support/v4/widget/DrawerLayout$AccessibilityDelegate.class...
processing android/support/v4/widget/ScrollerCompatGingerbread.class...
processing android/support/v4/widget/PopupMenuCompat$BasePopupMenuImpl.class...
processing android/support/v4/widget/EdgeEffectCompat.class...
processing android/support/v4/widget/SlidingPaneLayout$SlidingPanelLayoutImplBase.class...
processing android/support/v4/widget/SwipeProgressBar.class...
processing android/support/v4/widget/SlidingPaneLayout$1.class...
processing android/support/v4/widget/PopupMenuCompatKitKat.class...
processing android/support/v4/widget/ExploreByTouchHelper.class...
processing android/support/v4/widget/ListPopupWindowCompatKitKat.class...
processing android/support/v4/widget/SlidingPaneLayout$SlidingPanelLayoutImplJBMR1.class...
processing android/support/v4/widget/CursorAdapter.class...
processing android/support/v4/widget/ScrollerCompat$ScrollerCompatImplBase.class...
processing android/support/v4/widget/EdgeEffectCompat$BaseEdgeEffectImpl.class...
processing android/support/v4/widget/CursorFilter$CursorFilterClient.class...
processing android/support/v4/widget/SearchViewCompatHoneycomb$OnQueryTextListenerCompatBridge.class...
processing android/support/v4/widget/SlidingPaneLayout$SlidingPanelLayoutImpl.class...
processing android/support/v4/widget/DrawerLayout$SavedState.class...
processing android/support/v4/widget/DrawerLayout$ViewDragCallback.class...
processing android/support/v4/widget/ListPopupWindowCompat$KitKatListPopupWindowImpl.class...
processing android/support/v4/widget/ListPopupWindowCompat$ListPopupWindowImpl.class...
processing android/support/v4/widget/SwipeRefreshLayout$4.class...
processing android/support/v4/widget/ListViewAutoScrollHelper.class...
processing android/support/v4/widget/SearchViewCompat$SearchViewCompatIcsImpl.class...
processing android/support/v4/widget/DrawerLayout$SimpleDrawerListener.class...
processing android/support/v4/widget/SearchViewCompatHoneycomb.class...
processing android/support/v4/widget/SlidingPaneLayout$SimplePanelSlideListener.class...
processing android/support/v4/widget/SwipeRefreshLayout$6.class...
processing android/support/v4/widget/DrawerLayout$LockMode.class...
processing android/support/v4/widget/PopupMenuCompat$PopupMenuImpl.class...
processing android/support/v4/widget/CursorAdapter$MyDataSetObserver.class...
processing android/support/v4/widget/SimpleCursorAdapter$ViewBinder.class...
processing android/support/v4/widget/ScrollerCompat$ScrollerCompatImplGingerbread.class...
processing android/support/v4/widget/SimpleCursorAdapter.class...
processing android/support/v4/widget/AutoScrollHelper$1.class...
processing android/support/v4/widget/CursorAdapter$ChangeObserver.class...
processing android/support/v4/widget/PopupMenuCompat.class...
processing android/support/v4/widget/DrawerLayout.class...
processing android/support/v4/widget/SearchViewCompat.class...
processing android/support/v4/widget/ScrollerCompat$ScrollerCompatImpl.class...
processing android/support/v4/widget/SlidingPaneLayout$LayoutParams.class...
processing android/support/v4/widget/CursorAdapter$1.class...
processing android/support/v4/widget/ContentLoadingProgressBar$2.class...
processing android/support/v4/widget/SlidingPaneLayout$SavedState.class...
processing android/support/v4/widget/ViewDragHelper$1.class...
processing android/support/v4/widget/ExploreByTouchHelper$ExploreByTouchNodeProvider.class...
processing android/support/v4/widget/SearchViewCompatHoneycomb$OnCloseListenerCompatBridge.class...
processing android/support/v4/widget/SwipeRefreshLayout$5.class...
processing android/support/v4/widget/SearchViewCompatIcs.class...
processing android/support/v4/widget/ScrollerCompatIcs.class...
processing android/support/v4/media/TransportMediator$2.class...
processing android/support/v4/media/TransportMediatorJellybeanMR2$1.class...
processing android/support/v4/media/TransportController.class...
processing android/support/v4/media/TransportMediatorJellybeanMR2.class...
processing android/support/v4/media/TransportPerformer.class...
processing android/support/v4/media/TransportMediator.class...
processing android/support/v4/media/TransportMediator$1.class...
processing android/support/v4/media/TransportMediatorJellybeanMR2$4.class...
processing android/support/v4/media/TransportMediatorJellybeanMR2$3.class...
processing android/support/v4/media/TransportStateListener.class...
processing android/support/v4/media/TransportMediatorJellybeanMR2$2.class...
processing android/support/v4/media/TransportMediatorCallback.class...
processing android/support/v4/os/Environ
this class is attempted to be added twice
com.ssd.shootwin.R$attr
This is not a name i’m familiar with, what Java libraries did you add to your game? did you happen to unintentionally add the same one twice ? could you list what you have under Assets/Plugins/Android
I added a native android jar plugin for sms functionality. The developer who made this jar plugin, has lost the source completely. And it was done quite a time ago. “ssd.shootwin.R$attr” most likely come from that plugin. On plugin/android folder I have one menifest, that sms plugin jar file and a folder named “facebook”.
I am really worried about this.
well, that class is added twice somehow. Look whether you have this jar multiple times.
I decompiled that sms jar and found out the respective classes which are necessary for sms functionalities. Now is there any way to inject those methods into facebook source java files and product modified facebook plugin?