Android-database-sqlcipher Android Studio BUILD FAILED

error info :
E:\project\android-database-sqlcipher1\app\src\main\jni\android_util_Binder.h
Error:(18, 28) binder/IBinder.h: No such file or directory
compilation terminated.
make.exe: *** [E:\project\android-database-sqlcipher1\app\build\intermediates\ndk\debug\obj/local/armeabi/objs/database_sqlcipher/E_\project\android-database-sqlcipher1\app\src\main\jni\android_util_Binder.o] Error 1
Error:Execution failed for task ‘:app:compileDebugNdk’.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘E:\android\adt-bundle-windows-x86-20140321\android-ndk-r10e\ndk-build.cmd’’ finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 16.087 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console
NDK : android-ndk-r9d-windows-x86 ,With android-ndk-r9d-windows-x86 is the same error。


I need to do something like this, because I use the so file directly, and Android 6 on the mobile device directly crashes on App .The following is the error log information:

java.lang.UnsatisfiedLinkError: dlopen failed: /data/app-lib/com.icss.contacts-1/libstlport_shared.so: has text relocations
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:142)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:137)
at com.icss.contacts.base.App.initDB(App.java:76)
at com.icss.contacts.base.App.onCreate(App.java:70)
at com.qihoo.util.StubApplication.onCreate(StubApplication.java:75)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4720)
at android.app.ActivityThread.access$1600(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1410)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5432)

Hi @jxgzwyl

It appears that the submodules were not initialized, please run make init to resolve and then rerun your build.

Studio Android how to compile android-database-sqlcipher1, the system environment is win 7.[quote=“jxgzwyl, post:1, topic:1073”]
I need to do something like this, because I use the so file directly, and Android 6 on the mobile device directly crashes on App .The following is the error log information:

java.lang.UnsatisfiedLinkError: dlopen failed: /data/app-lib/com.icss.contacts-1/libstlport_shared.so: has text relocations at java.lang.Runtime.loadLibrary(Runtime.java:372) at java.lang.System.loadLibrary(System.java:1076) at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:142) at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:137) at com.icss.contacts.base.App.initDB(App.java:76) at com.icss.contacts.base.App.onCreate(App.java:70) at com.qihoo.util.StubApplication.onCreate(StubApplication.java:75) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4720) at android.app.ActivityThread.access$1600(ActivityThread.java:153) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1410) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5432)
[/quote]

make init can be successfully executed, download a lot of files, the implementation of a long time, whether it is normal

make init,
Download a few hours, as if to compile the Android system. This project in the end need to rely on, why ?
he first time this is performed we need to initialize various git submodules that SQLCipher for Android depends on。how long it takes to run, what files to download,why??
Cloning into ‘external/platform-frameworks-base’…
remote: Counting objects: 1563765, done.
remote: Compressing objects: 100% (28/28), done.
Receiving objects: 26% (421794/1563765), 1.23 GiB | 136.00 KiB/s

Why ??? win7+cywin

yilongwu@yilongwu-PC /cygdrive/e/android/workspace/android-database-sqlcipher
$ make init
which: no faketime in (/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Ja va/javapath:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows /System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/P rogram Files/Intel/DMIX:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Pro gram Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files/TortoiseS VN/bin:/cygdrive/e/android/gradle-2.4-all/gradle-2.4/bin:%JAVA_HOME%/bin:

/cygdri ve/c/Users/yilongwu/AppData/Local/Programs/Git/bin:/cygdrive/e/android/ASDK/tool s:/cygdrive/e/android/ASDK/platform-tools:/cygdrive/e/android/adt-bundle-windows -x86-20140321/android-ndk-r9d-windows-x86/android-ndk-r9d

)

git submodule update --init

android update project -p .

make: android:command-not-found

Makefile:35: recipe for target ‘init’ failed
make: *** [init] Error 127

Hello @jxgzwyl

I’m glad to hear you were able to initialize the submodules, SQLCipher for Android has various dependencies they fulfill, mainly in the JNI layer. The make init command is looking for the android binary, which does not appear to be on your PATH. This is typically found in the $ANDROID_HOME/tools directory.