1 2--- 3 Cargo.toml | 1 + 4 src/lib.rs | 2 +- 5 2 files changed, 2 insertions(+), 1 deletion(-) 6 7diff --git b/Cargo.toml a/Cargo.toml 8index 77fe68f7..bc62b4a7 100644 9--- b/Cargo.toml 10+++ a/Cargo.toml 11@@ -10,6 +10,7 @@ 12 # See Cargo.toml.orig for the original contents. 13 14 [package] 15+edition = "2018" # ANDROID: Required to build dylib in no_std. 16 name = "memoffset" 17 version = "0.9.0" 18 authors = ["Gilad Naaman <[email protected]>"] 19diff --git b/src/lib.rs a/src/lib.rs 20index ccf182b6..8d65d9aa 100644 21--- b/src/lib.rs 22+++ a/src/lib.rs 23@@ -55,7 +55,7 @@ 24 //! let checksum = crc16(checksum_range); 25 //! ``` 26 27-#![no_std] 28+#![cfg_attr(not(aosp_force_use_std), no_std)] 29 #![cfg_attr( 30 all(feature = "unstable_const", not(stable_const)), 31 feature(const_ptr_offset_from) 32