@@ -34,6 +34,63 @@ emulator. Here are instructions for creating an Android virtual device
34
34
35
35
http://developer.android.com/tools/devices/managing-avds.html#createavd
36
36
37
+ Build instructions (without Android Studio)
38
+ -------------------------------------------
39
+
40
+ 1. Install the Android SDK including at least the API 23 (Android 6.0),
41
+ Build Tools, API Platform, Google APIs, Google Play Services,
42
+ Android Support Library, the Local Maven Repository for Support and
43
+ the Google Repository.
44
+
45
+ All of these can be installed, together with their dependencies,
46
+ using the Android SDK manager.
47
+
48
+ 2. Comment out or remove references to Crashlytics. The following are
49
+ known references as at ``5de0b0e ``. For future versions,
50
+ ``grep -ir crashlytics . `` is your friend.
51
+
52
+ If you do not remove Crashlytics then the app will crash on startup
53
+ unless Crashlytics has been set up correctly as a member of the zulip
54
+ team.
55
+
56
+ * In ``app/src/main/java/com/zulip/android/ZLog.java ``:
57
+
58
+ * Line 5: ``import com.crashlytics.android.Crashlytics; ``
59
+
60
+ * Line 13: ``Crashlytics.logException(e); ``
61
+
62
+ * In ``app/src/main/java/com/zulip/android/ZulipActivity.java ``:
63
+
64
+ * Line 50: ``import com.crashlytics.android.Crashlytics; ``
65
+
66
+ * Line 162: ``Crashlytics.start(this); ``
67
+
68
+ 3. Run ``./gradlew `` (or ``gradlew.bat `` on Windows). This should
69
+ automatically build the application, downloading anything it
70
+ needs to do so.
71
+
72
+ If you get a failed build with
73
+ ``A problem occurred configuring project ':app'. `` then you might
74
+ not have all the required SDK libraries. Make sure that you have
75
+ all the dependencies of the libraries listed above, and that all
76
+ versions match precisely.
77
+
78
+ If the appropriate tools cannot be found by gradle, make sure that
79
+ ``ANDROID_HOME `` is properly set (this should point to the root
80
+ directory for the Android SDK i.e. the one which contains the add-ons,
81
+ build-tools, docs and other directories).
82
+
83
+ 4. To build the APK, run ``./gradlew assemble ``. Your APKs will be
84
+ placed in ``app/build/outputs/apk ``.
85
+
86
+ The ``app-debug.apk `` can be installed directly on the device, or
87
+ loaded over USB using ``./gradlew installDebug `` or
88
+ ``adb install /path/to/app/build/outputs/apk/app-debug.apk ``.
89
+
90
+ Note that ``app-release-unsigned.apk `` will **not ** install by
91
+ default because it is unsigned. You will be told the APK cannot be
92
+ parsed.
93
+
37
94
Coding Style
38
95
------------
39
96
0 commit comments