SQLite Android Bindings
Check-in [19e60f6dba]
Not logged in

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

Overview
Comment:Add a step-by-step walkthrough of using a pre-built aar file with Android Studio 2.1.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 19e60f6dba43945562db5e1c27cf319a5e29641b
User & Date: dan 2016-10-10 17:53:21
Context
2016-10-14
11:36
Upgrade this project to SQLite version 3.15. check-in: 4c92d6406c user: dan tags: trunk
2016-10-10
17:53
Add a step-by-step walkthrough of using a pre-built aar file with Android Studio 2.1. check-in: 19e60f6dba user: dan tags: trunk
2016-08-11
19:19
Update to SQLite version 3.14.1. check-in: 0e2daf9643 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to www/install.wiki.

49
50
51
52
53
54
55




56
57
58
59
60
61
62
    by adding code similar to the following to the application modules
    <code>build.gradle</code> file: <verbatim>
    dependencies {
        // Change "sqlite-android-3130000" to the name of the new module!
        compile project(':sqlite-android-3130000')
    }</verbatim>
</ol>




<p>
  At time of writing, aar files may only be used directly in Android Studio
  projects, not projects created using other IDEs (e.g. Eclipse, IntelliJ
  IDEA). However, an aar is just a zip archive containing a
  <code>classes.jar</code> file that in turn contains the SQLite Android
  binding java classes and a <code>jni/</code> directory that contains the 
  native library for each platform.  By extracting these two things from the 







>
>
>
>







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
    by adding code similar to the following to the application modules
    <code>build.gradle</code> file: <verbatim>
    dependencies {
        // Change "sqlite-android-3130000" to the name of the new module!
        compile project(':sqlite-android-3130000')
    }</verbatim>
</ol>

<p> A more detailed description of using the steps above to create a very 
    simple applictation is [./verysimpleapp.wiki | available here].

<p>
  At time of writing, aar files may only be used directly in Android Studio
  projects, not projects created using other IDEs (e.g. Eclipse, IntelliJ
  IDEA). However, an aar is just a zip archive containing a
  <code>classes.jar</code> file that in turn contains the SQLite Android
  binding java classes and a <code>jni/</code> directory that contains the 
  native library for each platform.  By extracting these two things from the 

Added www/verysimpleapp.wiki.



















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

<h1>Very Simple App</h1>

<p>
1. Create a new project in Android Studio. Use the "Basic Activity" template.
Leave all other settings at their defaults.

<p style="margin:3ex 0 3ex 0">
<img align=left width=45% margin=20 src=vsa/1newproject.png>
<img align=left width=45% src=vsa/2newproject.png>
<p style="clear:both">
<img align=left width=45% src=vsa/3newproject.png>
<img align=left width=45% src=vsa/4newproject.png>
<br style="clear:both">

<p style="margin:3ex 0 3ex 0">
2. Modify the code in MainActivity.java as follows:

<p>
<img align=left width=45% src=vsa/1editmainactivity.png>
<br style="clear:both">

<p style="margin:3ex 0 3ex 0">
3. Set the name of the TextView widget in MainActivity to "tv_widget".

<p>
<img align=left width=45% src=vsa/1setwidgetid.png>
<br style="clear:both">

<p style="margin:3ex 0 3ex 0">
4. Import the pre-built SQLite aar file:

<p>
<img align=left width=45% src=vsa/1importmodule.png>
<img align=left width=45% src=vsa/2importmodule.png>
<p style="clear:both">
<img align=left width=45% src=vsa/3importmodule.png>
<br style="clear:both">

<p style="margin:3ex 0 3ex 0">
5. Add the dependency on the new module to the application module:

<p>
<img align=left width=45% src=vsa/1adddep.png>
<img align=left width=45% src=vsa/2adddep.png>
<p style="clear:both">
<img align=left width=45% src=vsa/3adddep.png>
<br style="clear:both">

<p style="margin:3ex 0 3ex 0">
6. The very simple app is now ready to build! Click the green triangle on the
toolbar to build, deploy and run it.

<p>
<img align=left width=45% src=vsa/1build.png>
<br style="clear:both">

Added www/vsa/1adddep.png.

cannot compute difference between binary files

Added www/vsa/1build.png.

cannot compute difference between binary files

Added www/vsa/1editmainactivity.png.

cannot compute difference between binary files

Added www/vsa/1importmodule.png.

cannot compute difference between binary files

Added www/vsa/1newproject.png.

cannot compute difference between binary files

Added www/vsa/1setwidgetid.png.

cannot compute difference between binary files

Added www/vsa/2adddep.png.

cannot compute difference between binary files

Added www/vsa/2importmodule.png.

cannot compute difference between binary files

Added www/vsa/2newproject.png.

cannot compute difference between binary files

Added www/vsa/3adddep.png.

cannot compute difference between binary files

Added www/vsa/3importmodule.png.

cannot compute difference between binary files

Added www/vsa/3newproject.png.

cannot compute difference between binary files

Added www/vsa/4newproject.png.

cannot compute difference between binary files