How create android java plugin

In eclipse i create Android Application,
in project properties mark checkbox Is Library,
in eclipse create external link to classes.jar, which located in ‘C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\androidplayer\bin’,
inherit my activity from UnityPlayerActivity,
export library myplugin.jar from eclipse,
move myplugin.jar and AndroidManifest.xml in Assets/Plugins/Android unity folder,

When i try build application, throws exception

**Building DEX Failed!
C:\Users\Oleg\Documents\New Unity Project\Temp/StagingArea> java -Xmx1024M -Djava.ext.dirs=“C:/Program Files (x86)/Android/android-sdk\platform-tools/lib/” -jar “C:/Program Files (x86)/Android/android-sdk\platform-tools/lib/dx.jar” --dex --verbose --output=bin/classes.dex bin/classes.jar plugins

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/unity3d/player/UnityPlayerActivity;**

Looks like you somehow included classes.jar into your .jar files so UnityPlayerActivity is added twice. Please decompile your jar and see if it is actually inside or not. Most of the times you do not need subclass UnityPlayerActivity if you don’t need onActivityResult callback. You can also use AndroidJavaObject and AndroidJavaClass to solve most of the plugins tasks. Here is a free plugin from asset store which can be a great example how to do so.

Just wanted to ask if you were able to create an Android java plugin by now? I am searching for a tutorial or instructions how to do so but with no luck so far. Some advice would be highly appreciated. Thank you.