Banging my head like crazy. I have to use 2020.3.33f to build and am targeting API 33. When I build and run to an attached device I continually get the below error.
CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
C:\Program Files\Unity\Hub\Editor\2020.3.33f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe -s “A00000V791291704079” install -r -d “C:\Users\davwhite\source\shadows-edge-bitbucket\361.apk”
stderr[
adb: failed to install C:\Users\davwhite\source\shadows-edge-bitbucket\361.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl428604736.tmp/base.apk (at Binary XML file line #95 ): requires an android:value or android:resource attribute]
]
stdout[
]
…
I am using a custom maniufest and the activity from it is below:
From the analyzer:
The line number points to the meta-data line when I use Android tools to debig the apk. Any help would be apprecaited as I am at a complete loss
dwhiteddsoft:
Banging my head like crazy. I have to use 2020.3.33f to build and am targeting API 33. When I build and run to an attached device I continually get the below error.
CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
C:\Program Files\Unity\Hub\Editor\2020.3.33f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe -s “A00000V791291704079” install -r -d “C:\Users\davwhite\source\shadows-edge-bitbucket\361.apk”
stderr[
adb: failed to install C:\Users\davwhite\source\shadows-edge-bitbucket\361.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl428604736.tmp/base.apk (at Binary XML file line #95 ): requires an android:value or android:resource attribute]
]
stdout[
]
…
I am using a custom maniufest and the activity from it is below:
From the analyzer:
The line number points to the meta-data line when I use Android tools to debig the apk. Any help would be apprecaited as I am at a complete loss
Share complete merged final android manifest file.
From: \Temp\gradleOut\launcher\build\intermediates\merged_manifests\release
<?xml version="1.0" encoding="utf-8"?>
<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.shadowsedge.diggingdeep"
android:installLocation="auto"
android:versionCode="361"
android:versionName="2.0.2" >
<uses-sdk
android:minSdkVersion="22"
android:targetSdkVersion="33" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen.multitouch"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen.multitouch.distinct"
android:required="false" /> <!-- Include required permissions for Advertising Id -->
<uses-permission android:name="com.google.android.gms.permission.AD_ID" /> <!-- Permission will be merged into the manifest of the hosting app. -->
<!-- Is required to launch foreground extraction service for targetSdkVersion 28+. -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:debuggable="false"
android:extractNativeLibs="true"
android:hardwareAccelerated="true"
android:icon=" @Mipmap /app_icon"
android:label=" @anon_76954444 /app_name"
android:networkSecurityConfig=" @ /network_security_config"
android:roundIcon=" @Mipmap /app_icon_round"
android:theme="@android:style/Theme.NoTitleBar" >
<activity
android:name="com.unity3d.player.UnityPlayerActivity"
android:allowBackup="false"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density"
android:exported="true"
android:fullBackupOnly="false"
android:hardwareAccelerated="true"
android:label=" @anon_76954444 /app_name"
android:launchMode="singleTask"
android:resizeableActivity="false"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="unityplayer.UnityActivity"
android:value="true" />
</activity>
<activity
android:name="com.facebook.unity.FBUnityLoginActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.facebook.unity.FBUnityDialogsActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.facebook.unity.FBUnityGamingServicesFriendFinderActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityAppLinkActivity" />
<activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" />
<activity android:name="com.facebook.unity.FBUnityGameRequestActivity" />
<activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" />
<activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="fb2796151350700539" />
<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" />
<meta-data android:name="com.facebook.sdk.AdvertiserIDCollectionEnabled" />
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.app.FacebookContentProvider2796151350700539" />
<meta-data
android:name="unity.splash-mode"
android:value="0" />
<meta-data
android:name="unity.splash-enable"
android:value="True" />
<meta-data
android:name="unity.allow-resizable-window"
android:value="False" />
<meta-data
android:name="unity.build-id"
android:value="18b7eaba-e300-48f4-bc3d-28ce090ccacc" />
<activity
android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
android:excludeFromRecents="true"
android:exported="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<!--
Service handling Google Sign-In user revocation. For apps that do not integrate with
Google Sign-In, this service will never be started.
-->
<service
android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
android:exported="true"
android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION"
android:visibleToInstantApps="true" />
<activity
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.google.android.gms.version"
android:value=" @Integer /google_play_services_version" /> <!-- The activities will be merged into the manifest of the hosting app. -->
<activity
android:name="com.google.android.play.core.missingsplits.PlayCoreMissingSplitsActivity"
android:enabled="false"
android:exported="false"
android:launchMode="singleInstance"
android:process=":playcore_missing_splits_activity"
android:stateNotNeeded="true" />
<activity
android:name="com.google.android.play.core.common.PlayCoreDialogWrapperActivity"
android:enabled="false"
android:exported="false"
android:stateNotNeeded="true"
android:theme=" @ /Theme.PlayCore.Transparent" /> <!-- The service will be merged into the manifest of the hosting app. -->
<service
android:name="com.google.android.play.core.assetpacks.AssetPackExtractionService"
android:enabled="false"
android:exported="true" />
<service
android:name="com.gameanalytics.sdk.errorreporter.GameAnalyticsExceptionReportService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:process=":gameAnalyticsExceptionReporter" />
<meta-data
android:name="aia-compat-api-min-version"
android:value="1" />
<activity android:name="com.unity3d.plugin.downloader.UnityDownloaderActivity" />
<service android:name="com.unity3d.plugin.downloader.UnityDownloaderService" />
<receiver android:name="com.unity3d.plugin.downloader.UnityAlarmReceiver" />
<activity
android:name="com.voxelbusters.android.essentialkit.features.notificationservices.NotificationLauncher"
android:exported="true"
android:theme=" @ /Theme.Transparent" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.shadowsedge.diggingdeep.essentialkit.fileprovider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource=" @ /essential_kit_file_paths" />
</provider>
<receiver android:name="com.voxelbusters.android.essentialkit.features.notificationservices.AlarmBroadcastReceiver" />
<receiver
android:name="com.voxelbusters.android.essentialkit.features.notificationservices.BootCompleteBroadcastReceiver"
android:exported="false" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
</application>
</manifest>
dwhiteddsoft:
dwhiteddsoft:
Surprised to see “[USER=94…]” in the manifest file. Is this decompiled apk or the original merged one?
You can get original merged one from Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary folders.[/USER]
That manifest was from folder: \Temp\gradleOut\launcher\build\intermediates\merged_manifests\release
I am sorry but I do not have the folder: Library/Bee/Android/Prj/Il2CPP/Gradle/unityLibrary you mention above? Where can I located it?
Ok, you might be on a older version of unity then. Yes, pass me the file from Temp\gradleOut…
Passed you the file privately. Yes I am on 2020.3.33f
Thanks for sharing the actual manifest file. The @ got replaced when you posted here earlier on forum. Anyways,
I see where the problem is. I’m not sure if it’s manually added or directly from the FB plugin. In either cases it’s possible to fix by the two following options.
#1 . Add false value attribute like below
<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" android:value="false"/>
<meta-data android:name="com.facebook.sdk.AdvertiserIDCollectionEnabled" android:value="false"/>
or
#2 . Enable Main Manifest file and add the above two entries(quoted code in #1 ) under application tag in main manifest file.
It’s great to see that you are using our Essential Kit plugin. Do let us know your feedback on our discord!
Cheers,
VB Team