@@ -50,6 +50,13 @@ with the regular `cargo build`.
5050
5151This will build an Android package in ` target/android-artifacts/<debug|release>/apk ` .
5252
53+ ### Compiling Multiple Binaries
54+
55+ ` cargo apk build ` supports building multiple binaries and examples using the same arguments as ` cargo build ` . It will produce an APK for each binary.
56+
57+ Android packages for bin targets are placed in ` target/android-artifacts/<debug|release>/apk/examples ` .
58+ Android packages for example targets are placed in ` target/android-artifacts/<debug|release>/apk/examples ` .
59+
5360### Testing on an Android emulator
5461
5562Start the emulator, then run:
@@ -110,16 +117,16 @@ build_targets = [ "armv7-linux-androideabi", "aarch64-linux-android", "i686-linu
110117package_name = " rust.cargo.apk.advanced"
111118
112119# The user-friendly name for your app, as displayed in the applications menu.
113- label = " Advanced android-rs-glue example "
120+ label = " My Android App "
114121
115122# Path to your application's res/ folder.
116- res = " res "
123+ res = " path/to/res_folder "
117124
118125# Virtual path your application's icon for any mipmap level.
119126icon = " @mipmap/ic_launcher"
120127
121128# Path to the folder containing your application's assets.
122- assets = " assets "
129+ assets = " path/to/assets_folder "
123130
124131# If set to true, makes the app run in full-screen, by adding the following line
125132# as an XML attribute to the manifest's <application> tag :
@@ -144,6 +151,11 @@ opengles_version_minor = 2
144151"android:screenOrientation" = " unspecified"
145152"android:uiOptions" = " none"
146153
154+ # Adds a uses-feature element to the manifest
155+ # Supported keys: name, required, version
156+ # The glEsVersion attribute is not supported using this section.
157+ # It can be specified using the opengles_version_major and opengles_version_minor values
158+ # See https://developer.android.com/guide/topics/manifest/uses-feature-element
147159[[package .metadata .android .feature ]]
148160name = " android.hardware.camera"
149161
@@ -152,15 +164,14 @@ name = "android.hardware.vulkan.level"
152164version = " 1"
153165required = false
154166
155- # Request permissions. Note that android_version 23 and higher, Android requires the application
156- # to request permissions at runtime. There is currently no way to do this using a pure NDK based application.
167+ # Adds a uses-permission element to the manifest.
168+ # Note that android_version 23 and higher, Android requires the application to request permissions at runtime.
169+ # There is currently no way to do this using a pure NDK based application.
170+ # See https://developer.android.com/guide/topics/manifest/uses-permission-element
157171[[package .metadata .android .permission ]]
158172name = " android.permission.WRITE_EXTERNAL_STORAGE"
159173maxSdkVersion = " 18"
160174
161175[[package .metadata .android .permission ]]
162176name = " android.permission.CAMERA"
163-
164- [dependencies .android_glue ]
165- path = " ../../glue"
166177```
0 commit comments