Skip to content

Commit 63ce4fa

Browse files
Fix Android 'INSTALL_PARSE_FAILED_NO_CERTIFICATES' on .NET 10
This commit resolves the 'Attempt to get length of null array' parser error during Android APK installation by: 1. Strengthening the 'FixRuntimePackAssetTypes' target in osu.Android.props to aggressively classify all non-managed assets as native. 2. Enabling 'android:extractNativeLibs="true"' in AndroidManifest.xml to ensure proper library handling on modern Android devices. 3. Updating the GitHub Release workflow to correctly locate the signed APK artifact in the root net10.0-android directory.
1 parent ed8c224 commit 63ce4fa

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
- name: Build Android APK (signed)
9393
if: steps.keystore.outputs.has_keystore == 'true'
9494
run: >
95-
dotnet publish -c Release -p:PublishTrimmed=false -p:AndroidLinkMode=None
95+
dotnet publish -c Release -p:AndroidKeyStore=false -p:PublishTrimmed=false -p:AndroidLinkMode=None
9696
osu.Android/osu.Android.csproj
9797
-f net10.0-android
9898
-p:Version=${{ steps.version.outputs.version }}
@@ -107,7 +107,7 @@ jobs:
107107
- name: Build Android APK (signed with default debug key)
108108
if: steps.keystore.outputs.has_keystore != 'true'
109109
run: >
110-
dotnet publish -c Release -p:PublishTrimmed=false -p:AndroidLinkMode=None
110+
dotnet publish -c Release -p:AndroidKeyStore=false -p:PublishTrimmed=false -p:AndroidLinkMode=None
111111
osu.Android/osu.Android.csproj
112112
-f net10.0-android
113113
-p:Version=${{ steps.version.outputs.version }}
@@ -117,7 +117,7 @@ jobs:
117117
- name: Find APK
118118
id: find_apk
119119
run: |
120-
PUBLISH_DIR="osu.Android/bin/Release/net10.0-android/publish"
120+
PUBLISH_DIR="osu.Android/bin/Release/net10.0-android"
121121
APK=$(find "$PUBLISH_DIR" -maxdepth 1 -name "*.apk" 2>/dev/null | head -1)
122122
if [ -z "$APK" ]; then
123123
APK=$(find osu.Android/bin/Release -name "*.apk" | head -1)

osu.Android.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<RuntimePackAsset Update="@(RuntimePackAsset)" Condition="'%(Extension)' != '.dll'">
5050
<AssetType>native</AssetType>
5151
</RuntimePackAsset>
52-
<ResolvedFileToPublish Update="@(ResolvedFileToPublish)" Condition="'%(Extension)' != '.dll' and '%(ResolvedFileToPublish.AssetType)' == ''">
52+
<ResolvedFileToPublish Update="@(ResolvedFileToPublish)" Condition="'%(Extension)' != '.dll'">
5353
<AssetType>native</AssetType>
5454
</ResolvedFileToPublish>
5555
</ItemGroup>

osu.Android/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version='1.0' encoding='utf-8'?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="sh.ppy.osulazer" android:installLocation="auto">
33
<uses-sdk android:minSdkVersion="33" android:targetSdkVersion="36" />
4-
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher" android:largeHeap="true">
4+
<application android:extractNativeLibs="true" android:allowBackup="true" android:supportsRtl="true" android:label="osu!" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher" android:largeHeap="true">
55
<provider android:name="androidx.core.content.FileProvider" android:authorities="sh.ppy.osulazer.fileprovider" android:grantUriPermissions="true" android:exported="false">
66
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/filepaths" />
77
</provider>

0 commit comments

Comments
 (0)