SQLite Android Bindings

Check-in [4158b72c14]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix typos in www/install.wiki.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4158b72c14cf51cb46afacb415157ad3b36c3e19
User & Date: dan 2016-08-08 14:41:03.389
Context
2016-08-08
16:30
Build with json1, rtree, fts3 and fts5 by default. (check-in: ffc1805e78 user: dan tags: trunk)
14:41
Fix typos in www/install.wiki. (check-in: 4158b72c14 user: dan tags: trunk)
2016-05-20
19:15
Change the example name to "sqlite-android-3130000" (no 3). (check-in: b9019bf04f user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to www/install.wiki.
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
  <li><a name=buildnative></a> <b>Build the native libraries.</b>
  <p> To build the native libraries, navigate to the
      <code>sqlite3/src/main/</code> directory of the project directory and
      run the <code>ndk-build</code> command. For example, on Linux if 
      Android Studio and the NDK are installed using their default paths:
<verbatim>
    $ cd sqlite3/src/main
    $ ~/Android/Sdks/ndk-bundle/ndk-build</verbatim>
  <p> On modern hardware, this command takes roughly 2 minutes to build the
      native libraries for all Android architectures.
  <p> 
  The latest release of the public domain SQLite library comes bundled 
  with the SQLite Android bindings code downloaded in step 1. If you wish
  to use a different version of SQLite, for example one that contains the
  proprietry [./see.wiki | SEE extension], then replace the <code>sqlite3.c</code>







|







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
  <li><a name=buildnative></a> <b>Build the native libraries.</b>
  <p> To build the native libraries, navigate to the
      <code>sqlite3/src/main/</code> directory of the project directory and
      run the <code>ndk-build</code> command. For example, on Linux if 
      Android Studio and the NDK are installed using their default paths:
<verbatim>
    $ cd sqlite3/src/main
    $ ~/Android/Sdk/ndk-bundle/ndk-build</verbatim>
  <p> On modern hardware, this command takes roughly 2 minutes to build the
      native libraries for all Android architectures.
  <p> 
  The latest release of the public domain SQLite library comes bundled 
  with the SQLite Android bindings code downloaded in step 1. If you wish
  to use a different version of SQLite, for example one that contains the
  proprietry [./see.wiki | SEE extension], then replace the <code>sqlite3.c</code>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
  switches, for example the -DSQLITE_ENABLE_FTS5 switch used to enable 
  <a href=http://www.sqlite.org/fts5.html>FTS5</a>, they should be added to
  the <code>Android.mk</code> file at this location:

<verbatim>
    sqlite3/src/main/jni/sqlite/Android.mk</verbatim>
  <p>
  If the <code>Android.mk</code> or <code>sqlite3.&lsp;ch&rsp;</code> files
  are edited after <code>ndk-build</code> is run, it may be necessary to run
  the <code>ndk-build clean</code> command before rerunning 
  <code>ndk-build</code> to ensure a correct build.
  <p>
  Once <code>ndk-build</code> has been run successfully, unless you modify
  the <code>Android.mk</code> or <code>sqlite3.&lsp;ch&rsp;</code> files,
  it should not be necessary to run it again. It <i>does not</i> have to be 
  run each time the application is rebuilt.

  <li> <b>Assemble the aar file</b>. To assemble the aar file using the 
  command line, first set environment variable ANDROID_HOME to the SDK
  directory, then run the gradle "assembleRelease" target from within the
  "sqlite3" sub-directory of the project directory. For example:







|





|







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
  switches, for example the -DSQLITE_ENABLE_FTS5 switch used to enable 
  <a href=http://www.sqlite.org/fts5.html>FTS5</a>, they should be added to
  the <code>Android.mk</code> file at this location:

<verbatim>
    sqlite3/src/main/jni/sqlite/Android.mk</verbatim>
  <p>
  If the <code>Android.mk</code> or <code>sqlite3.&#91;ch&#93;</code> files
  are edited after <code>ndk-build</code> is run, it may be necessary to run
  the <code>ndk-build clean</code> command before rerunning 
  <code>ndk-build</code> to ensure a correct build.
  <p>
  Once <code>ndk-build</code> has been run successfully, unless you modify
  the <code>Android.mk</code> or <code>sqlite3.&#91;ch&#93;</code> files,
  it should not be necessary to run it again. It <i>does not</i> have to be 
  run each time the application is rebuilt.

  <li> <b>Assemble the aar file</b>. To assemble the aar file using the 
  command line, first set environment variable ANDROID_HOME to the SDK
  directory, then run the gradle "assembleRelease" target from within the
  "sqlite3" sub-directory of the project directory. For example:
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
  <p>
  Using either the command line or Android Studio to run the gradle task
  causes the aar file to be created at:
  <code>sqlite3/build/outputs/aar/sqlite3-release.aar</code>.
  <p>
  Once the custom aar file has been created, it may be used in an Android
  Studio application as described above. The aar file should be roughly
  3MB in size. If it is much smaller than this (closer to 100KB), this
  indicates that the aar file is missing the native libraries. The usual
  cause of this is an unnoticed error while building the native libraries 
  (step 2 above).
</ol>

<h2> <a name=directint></a> 3. Adding Source Code Directly to the Application</h2>








|







154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
  <p>
  Using either the command line or Android Studio to run the gradle task
  causes the aar file to be created at:
  <code>sqlite3/build/outputs/aar/sqlite3-release.aar</code>.
  <p>
  Once the custom aar file has been created, it may be used in an Android
  Studio application as described above. The aar file should be roughly
  4.5MB in size. If it is much smaller than this (closer to 100KB), this
  indicates that the aar file is missing the native libraries. The usual
  cause of this is an unnoticed error while building the native libraries 
  (step 2 above).
</ol>

<h2> <a name=directint></a> 3. Adding Source Code Directly to the Application</h2>