forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] Add XA1025 error for Hybrid AOT on arme…
…abi-v7a Context: dotnet#1218 (comment) The undocumented, experimental `Hybrid` value for the `$(AndroidAotMode)` MSBuild property is not currently compatible with the armeabi-v7a target ABI. Attempting to run an app built with `$(AndroidAotMode)`=`Hybrid` in an armeabi-v7a environment results in a crash. Since it is known that this configuration currently produces a crash, emit a build error for it to improve the visibility of the known issue and reduce the time users might spend searching for the cause of the crash. Example of the current crash: F libc : Fatal signal 11 (SIGSEGV), code 2, fault addr 0x913a50c8 in tid 31140 (ppxamarinforms1) W : debuggerd: handling request: pid=31140 uid=10146 gid=10146 tid=31140 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** F DEBUG : Build fingerprint: 'motorola/perry_metropcs_c/perry:7.1.1/NCQS26.69-64-21/33:user/release-keys' F DEBUG : Revision: 'p3b0' F DEBUG : ABI: 'arm' F DEBUG : pid: 31140, tid: 31140, name: ppxamarinforms1 >>> com.companyname.mobileappxamarinforms1 <<< F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x913a50c8 F DEBUG : r0 be9384d4 r1 00000000 r2 be9385a0 r3 9320b1c0 F DEBUG : r4 00000000 r5 94167208 r6 00000000 r7 be938584 F DEBUG : r8 be938838 r9 ae040008 sl 00000000 fp be9385a0 F DEBUG : ip 913a50c8 sp be9384e4 lr 942a8420 pc 913a50c8 cpsr 000f0010 F DEBUG : F DEBUG : backtrace: F DEBUG : #00 pc 000250c8 [anon:libc_malloc:91380000] F DEBUG : #1 pc 0000141c <anonymous:942a7000> W ActivityManager: Activity pause timeout for ActivityRecord{7ded4d1 u0 com.companyname.mobileappxamarinforms1/crc64e53dff5578afb8f2.MainActivity t5740} I ActivityManager: Killing 30471:com.google.android.apps.fireball/u0a145 (adj 906): empty dotnet#13 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=624, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ], android.os.BinderProxy@f4c4e10) D ActivityManager: cleanUpApplicationRecord -- 30471 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=624, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ] W : debuggerd: resuming target 31140 I BootReceiver: Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE) W ActivityManager: Force finishing activity com.companyname.mobileappxamarinforms1/crc64e53dff5578afb8f2.MainActivity I Zygote : Process 31140 exited due to signal (11) Other changes: Update the `HybridAOT` test to cover the new error. Add a new `AndroidAotModeHybridAbortsOnArmeabiV7a` on-device test to remind the team to remove the error if hybrid AOT becomes compatible with armeabi-v7a in the future. Correct the `BuildIncrementalAot` test so that it sets `$(AndroidSupportedAbis)`. A side effect is that the test cases that use `$(AndroidAotMode)`=`Full` now build successfully. Note that although those test cases now build successfully, the resulting app packages abort when run on device because Xamarin.Android requires JIT compilation: Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper other) void Java.Interop.JavaVMInterface:PtrToStructure (intptr,object)' while running in aot-only mode. TODO: Add a build error for `$(AndroidAotMode)`=`Full`, likely by updating error XA3002.
- Loading branch information
1 parent
77d4af8
commit 83403ae
Showing
21 changed files
with
206 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: Xamarin.Android error XA1025 | ||
description: XA1025 error code | ||
ms.date: 11/08/2020 | ||
--- | ||
# Xamarin.Android error XA1025 | ||
|
||
## Example messages | ||
|
||
``` | ||
error XA1025: The experimental 'Hybrid' value for the 'AndroidAotMode' MSBuild | ||
property is not currently compatible with the armeabi-v7a target ABI. To | ||
continue using the experimental 'Hybrid' value for 'AndroidAotMode', deselect | ||
the armeabi-v7a target ABI in the Visual Studio project property pages or edit | ||
the project file in a text editor and remove 'armeabi-v7a' from the | ||
'AndroidSupportedAbis' MSBuild property. | ||
``` | ||
|
||
## Issue | ||
|
||
The project has the `AndroidAotMode` MSBuild property set to the experimental | ||
`Hybrid` value and also includes the value `armeabi-v7a` in the | ||
`AndroidSupportedAbis` MSBuild property. Applications built with | ||
`AndroidAotMode` set to `Hybrid` currently abort during startup on armeabi-v7a | ||
devices, so the build exits with an error if this configuration is found. | ||
|
||
## Solution | ||
|
||
If armeabi-v7a device compatibility is required for the app, the | ||
`AndroidAotMode` MSBuild property should be set to `Normal` or removed from the | ||
project file completely. To adjust the value of the `AndroidAotMode` MSBuild | ||
property, edit the project file in a text editor. | ||
|
||
If armeabi-v7a device compatibility is not required for the app, then deselect | ||
the **armeabi-v7a** target ABI in the Visual Studio project property pages to | ||
resolve the build error. | ||
|
||
In Visual Studio, the target ABIs can be adjusted under **Supported | ||
architectures** in the **Advanced** section of the **Android Options** tab of | ||
the project property pages | ||
|
||
In Visual Studio for Mac, the target ABIs can be adjusted under **Supported | ||
ABIs** in the **Advanced** tab of the **Android Build** section of the project | ||
property pages. | ||
|
||
Alternatively, edit the project file in a text editor and remove `armeabi-v7a` | ||
from the `AndroidSupportedAbis` MSBuild property by hand. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#### Deprecations, removals, and default configuration changes | ||
|
||
- [XA1025 error for Hybrid AndroidAotMode with incompatible armeabi-v7a target ABI](#xa1025-error-for-hybrid-androidaotmode-with-incompatible-armeabiv7a-target-abi) | ||
|
||
### XA1025 error for Hybrid AndroidAotMode with incompatible armeabi-v7a target ABI | ||
|
||
``` | ||
error XA1025: The experimental 'Hybrid' value for the 'AndroidAotMode' MSBuild | ||
property is not currently compatible with the armeabi-v7a target ABI. To | ||
continue using the experimental 'Hybrid' value for 'AndroidAotMode', deselect | ||
the armeabi-v7a target ABI in the Visual Studio project property pages or edit | ||
the project file in a text editor and remove 'armeabi-v7a' from the | ||
'AndroidSupportedAbis' MSBuild property. | ||
``` | ||
|
||
Projects using the experimental `Hybrid` value for the `AndroidAotMode` MSBuild | ||
property that also include the value `armeabi-v7a` in the `AndroidSupportedAbis` | ||
MSBuild property will now see this build error to help indicate that | ||
applications built with these settings would abort during startup on armeabi-v7a | ||
ABI device environments ([GitHub Issue 1218][github-1218]). | ||
|
||
If armeabi-v7a device compatibility is required for the app, the | ||
`AndroidAotMode` MSBuild property should be set to `Normal` or removed from the | ||
project file completely. To adjust the value of the `AndroidAotMode` MSBuild | ||
property, edit the project file in a text editor. | ||
|
||
If armeabi-v7a device compatibility is not required for the app, then deselect | ||
the **armeabi-v7a** target ABI in the Visual Studio project property pages to | ||
resolve the build error. | ||
|
||
In Visual Studio, the target ABIs can be adjusted under **Supported | ||
architectures** in the **Advanced** section of the **Android Options** tab of | ||
the project property pages | ||
|
||
In Visual Studio for Mac, the target ABIs can be adjusted under **Supported | ||
ABIs** in the **Advanced** tab of the **Android Build** section of the project | ||
property pages. | ||
|
||
Alternatively, edit the project file in a text editor and remove `armeabi-v7a` | ||
from the `AndroidSupportedAbis` MSBuild property by hand. | ||
|
||
[github-1218]: https://github.com/xamarin/xamarin-android/issues/1218 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.