I'm trying to understand how build and run a apk package with native library. I have build the "hello-jni" sample obtaning the libs/armeabi/libhello-jni.so library. I'm using Netbeans 7.1.1 so googling a bit i found this xml code to add on the build.xml file:
- Code: Select all
<target name="-post-jar">
<zip update="true" destfile="${dist.apk}">
<zipfileset dir="libs/armeabi" includes="*.so" prefix="libs/armeabi"/>
</zip>
<zip destfile="tmp.apk">
<zipfileset src="${dist.apk}">
<exclude name="META-INF/." />
</zipfileset>
</zip>
<move file="tmp.apk" tofile="${dist.apk}" />
<signjar jar="${dist.apk}" alias="androiddebugkey" storepass="android" keypass="android" keystore="myhome/.android/debug.keystore"/>
</target>
without this the library is not added to the apk package and the application can't load the library with System.loadLibrary function.
The problem is that i got the error Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
and "adb logcat" show the error Package sample.hellojni has mismatched certificates at entry libs/armeabi/libhello-jni.so; ignoring!
NOTE: It's the fist time that i install the application and can't try to uninstall it because it's not installed. I have just tried to remove the ~/.android/ directory and to do ./emulator -adv Android_1 -wipe-data without success.
Somebody can help me please ?

