Skip to content

Commit 692eaea

Browse files
grendellojonathanpeppers
authored andcommitted
Bump to Android NDK r24 (#6469)
Changes: https://github.com/android/ndk/wiki/Changelog-r24#changes The most interesting changes from Xamarin.Android's point of view: * GDB has been removed. Use LLDB instead. Note that ndk-gdb uses LLDB by default, and Android Studio has only ever supported LLDB. * Jelly Bean (APIs 16, 17, and 18) is no longer supported. The minimum OS supported by the NDK is KitKat (API level 19). * Non-Neon devices are no longer supported. A very small number of very old devices do not support Neon so most apps will not notice aside from the performance improvement. * Additional Apple M1 support: * LLVM tools are now universal binaries.
1 parent 5f98402 commit 692eaea

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

build-tools/xaprepare/xaprepare/ConfigAndData/BuildAndroidPlatforms.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ namespace Xamarin.Android.Prepare
55
{
66
class BuildAndroidPlatforms
77
{
8-
public const string AndroidNdkVersion = "23b";
9-
public const string AndroidNdkPkgRevision = "23.1.7779620";
8+
public const string AndroidNdkVersion = "24";
9+
public const string AndroidNdkPkgRevision = "24.0.8215888";
1010

1111
public static readonly List<AndroidPlatform> AllPlatforms = new List<AndroidPlatform> {
1212
new AndroidPlatform (apiName: "", apiLevel: 1, platformID: "1"),
@@ -51,9 +51,9 @@ class BuildAndroidPlatforms
5151
public const string AndroidX86_64_NET6 = AbiNames.TargetJit.AndroidX86_64 + "_NET6";
5252

5353
public static readonly Dictionary<string, uint> NdkMinimumAPI = new Dictionary<string, uint> {
54-
{ AbiNames.TargetJit.AndroidArmV7a, 16 }, { AndroidArmV7a_NET6, 21 },
54+
{ AbiNames.TargetJit.AndroidArmV7a, 19 }, { AndroidArmV7a_NET6, 21 },
5555
{ AbiNames.TargetJit.AndroidArmV8a, 21 }, { AndroidArmV8a_NET6, 21 },
56-
{ AbiNames.TargetJit.AndroidX86, 16 }, { AndroidX86_NET6, 21 },
56+
{ AbiNames.TargetJit.AndroidX86, 19 }, { AndroidX86_NET6, 21 },
5757
{ AbiNames.TargetJit.AndroidX86_64, 21 }, { AndroidX86_64_NET6, 21 },
5858
};
5959
}

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableL
207207
// Since we overrode minSdkVersion=16, that means we should use libc.so from android-16.
208208
if (ndk22OrNewer) {
209209
// NDK r22 or newer store libc in [toolchain]/sysroot/usr/lib/[ARCH]/[API]/libc.so
210-
StringAssertEx.ContainsRegex (@"\s*\[aot-compiler stdout].*sysroot.*.usr.lib.*16.libc\.so", b.LastBuildOutput, "AOT+LLVM should use libc.so from minSdkVersion!");
210+
StringAssertEx.ContainsRegex (@"\s*\[aot-compiler stdout].*sysroot.*.usr.lib.*19.libc\.so", b.LastBuildOutput, "AOT+LLVM should use libc.so from minSdkVersion!");
211211
} else {
212-
StringAssertEx.ContainsRegex (@"\s*\[aot-compiler stdout].*android-16.arch-.*.usr.lib.libc\.so", b.LastBuildOutput, "AOT+LLVM should use libc.so from minSdkVersion!");
212+
StringAssertEx.ContainsRegex (@"\s*\[aot-compiler stdout].*android-19.arch-.*.usr.lib.libc\.so", b.LastBuildOutput, "AOT+LLVM should use libc.so from minSdkVersion!");
213213
}
214214
}
215215
foreach (var abi in supportedAbis.Split (new char [] { ';' })) {

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/MakeBundleTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void CheckBundleForSoname (ZipArchive zip, string bundlePath)
159159
string sonameField;
160160

161161
if (elfReaderLlvm) {
162-
arguments = "-dynamic-table";
162+
arguments = "--dynamic-table";
163163
sonameField = "SONAME";
164164
} else {
165165
arguments = "-d";

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Linq;
33
using NUnit.Framework;
44
using Xamarin.ProjectTools;
@@ -440,7 +440,7 @@ public void DirectBootAwareAttribute ()
440440
/* pattern */ "{abi}{minSDK:00}{versionCode:000}",
441441
/* props */ null,
442442
/* shouldBuild */ true,
443-
/* expected */ "216012;316012",
443+
/* expected */ "219012;319012",
444444
},
445445
new object[] {
446446
/* seperateApk */ true,
@@ -450,7 +450,7 @@ public void DirectBootAwareAttribute ()
450450
/* pattern */ "{abi}{minSDK:00}{screen}{versionCode:000}",
451451
/* props */ "screen=24",
452452
/* shouldBuild */ true,
453-
/* expected */ "21624012;31624012",
453+
/* expected */ "21924012;31924012",
454454
},
455455
new object[] {
456456
/* seperateApk */ true,
@@ -460,7 +460,7 @@ public void DirectBootAwareAttribute ()
460460
/* pattern */ "{abi}{minSDK:00}{screen}{foo:0}{versionCode:000}",
461461
/* props */ "screen=24;foo=$(Foo)",
462462
/* shouldBuild */ true,
463-
/* expected */ "216241012;316241012",
463+
/* expected */ "219241012;319241012",
464464
},
465465
new object[] {
466466
/* seperateApk */ true,
@@ -470,7 +470,7 @@ public void DirectBootAwareAttribute ()
470470
/* pattern */ "{abi}{minSDK:00}{screen}{foo:00}{versionCode:000}",
471471
/* props */ "screen=24;foo=$(Foo)",
472472
/* shouldBuild */ false,
473-
/* expected */ "2162401012;3162401012",
473+
/* expected */ "2192401012;3192401012",
474474
},
475475
};
476476

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/NdkUtilTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void TestNdkUtil ()
4242
Assert.IsTrue (ndk.ValidateNdkPlatform (arch, enableLLVM: false));
4343
Assert.AreEqual (0, errors.Count, "NdkTools.ValidateNdkPlatform should not have returned false.");
4444
int level = ndk.GetMinimumApiLevelFor (arch);
45-
int expected = 16;
45+
int expected = 19;
4646
Assert.AreEqual (expected, level, $"Min Api Level for {arch} should be {expected}.");
4747
var compilerNoQuotes = ndk.GetToolPath (NdkToolKind.CompilerC, arch, level);
4848
Assert.AreEqual (0, errors.Count, "NdkTools.GetToolPath should not have errored.");

tests/Mono.Android-Tests/Properties/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="Mono.Android_Tests">
3-
<uses-sdk android:minSdkVersion="16" />
3+
<uses-sdk android:minSdkVersion="19" />
44
<application android:debuggable="true" android:label="Xamarin.Android.RuntimeTests" android:name="android.apptests.App" android:usesCleartextTraffic="true">
55
<activity android:name="android.apptests.RenamedActivity" android:configChanges="keyboardHidden" />
66
</application>

tests/Mono.Android-Tests/Runtime-AppBundle/Properties/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="Mono.Android_TestsAppBundle">
3-
<uses-sdk android:minSdkVersion="16" />
3+
<uses-sdk android:minSdkVersion="19" />
44
<application android:label="Xamarin.Android.RuntimeTestsAppBundle" android:name="android.apptests.App" android:usesCleartextTraffic="true">
55
<activity android:name="android.apptests.RenamedActivity" android:configChanges="keyboardHidden" />
66
</application>

0 commit comments

Comments
 (0)