@@ -11,7 +11,12 @@ const auto_detect = @import("build/auto-detect.zig");
1111pub fn toolchainHostTag() []const u8 {
1212 const os = builtin.os.tag;
1313 const arch = builtin.cpu.arch;
14- return (comptime if (std.mem.eql(u8, @tagName(os), "macos")) "darwin" else @tagName(os)) ++ "-" ++ @tagName(arch);
14+ if (std.mem.eql(u8, @tagName(os), "macos")) {
15+ // NOTE: There is no darwin-aarch64 toolchain for Android currently
16+ return "darwin-x86_64";
17+ } else {
18+ return @tagName(os) ++ "-" ++ @tagName(arch);
19+ }
1520}
1621
1722/// This file encodes a instance of an Android SDK interface.
@@ -108,8 +113,8 @@ pub fn init(b: *Build, user_config: ?UserConfig, toolchains: ToolchainVersions)
108113}
109114
110115pub const ToolchainVersions = struct {
111- build_tools_version: []const u8 = "33 .0.1 ",
112- ndk_version: []const u8 = "25.1.8937393 ",
116+ build_tools_version: []const u8 = "34 .0.0 ",
117+ ndk_version: []const u8 = "27.2.12479018 ",
113118};
114119
115120pub const AndroidVersion = enum(u16) {
@@ -179,8 +184,7 @@ pub const AppConfig = struct {
179184 package_name: []const u8,
180185
181186 /// The android version which is embedded in the manifset.
182- /// The default is Android 9, it's more than 4 years old by now and should be widespread enough to be a reasonable default.
183- target_version: AndroidVersion = .android9,
187+ target_version: AndroidVersion = .android13,
184188
185189 /// The resource directory that will contain the manifest and other app resources.
186190 /// This should be a distinct directory per app.
@@ -466,7 +470,7 @@ pub fn createApp(
466470 \\android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
467471 else
468472 \\
469- ;
473+ ;
470474
471475 writer.print(
472476 \\ <application android:debuggable="true" android:hasCode="{[hasCode]}" android:label="@string/app_name" {[theme]s} tools:replace="android:icon,android:theme,android:allowBackup,label" android:icon="@mipmap/icon" >
@@ -877,7 +881,7 @@ pub fn compileAppLibrary(
877881 exe.bundle_compiler_rt = true;
878882 exe.export_table = true;
879883
880- exe.defineCMacro ("ANDROID", null );
884+ exe.root_module.addCMacro ("ANDROID", "" );
881885
882886 exe.linkLibC();
883887 for (app_config.libraries) |lib| {
0 commit comments