I've created a cordova plugin like this tree:
LucenePlugin
src
android
libs
lucene-analyzers-2.4.1.jar
lucene-core-2.4.1.jar
lucene-snowball-2.4.1.jar
LucenePlugin.java
www
lucene.js
plugin.xml
In the plugin.xml, I added the .jar like this
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="org.apache.cordova.LuceneLibs">
<param name="android-package" value="org.apache.cordova.LuceneLibs"/>
</feature>
</config-file>
<source-file src="src/android/lucene-analyzers-2.4.1.jar" target-dir="libs" framework="true"/>
<source-file src="src/android/lucene-core-2.4.1.jar" target-dir="libs" framework="true"/>
<source-file src="src/android/lucene-snowball-2.4.1.jar" target-dir="libs" framework="true"/>
</platform>
When I add the plugin into cordova project, the libs seems to be at the good place:
platforms\android\libs\lucene-analyzers-2.4.1.jar etc...
Unfortunately, when I run the project, I have this error
W/System.err(12492): java.lang.NoClassDefFoundError:
org.apache.lucene.search.IndexSearcher
W/System.err(12492): at
org.apache.cordova.Lucene.LucenePlugin.execute(LucenePlugin.java:27)
W/System.err(12492): at
org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
W/System.err(12492): at
org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
Do you know what I forgot?
Thanks