Skip to content

Commit adfd244

Browse files
committed
Fast Dev V2
use AndroidIncludeDebugSymbols for _RemoveRegisterAttribute. Fixes #5009
1 parent aab69af commit adfd244

File tree

102 files changed

+446
-663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+446
-663
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
xamarin/monodroid:master@1ac5333ec5e90b4e1fb9b324714811effdede37f
1+
xamarin/monodroid:fastdevv2@600939d40e90f4a7b41c433de7d9695ceedcde56
22
mono/mono:2020-02@be2226b5a1c57df065efc4c1cf008d581e5cec7d

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"bin/TestDebug/MSBuildDeviceIntegration/MSBuildDeviceIntegration.dll",
55
"bin/TestDebug/net472/Xamarin.Android.Build.Tests.dll",
66
"bin/TestDebug/Xamarin.Android.Build.Tests.Commercial.dll",
7+
"bin/TestRelease/MSBuildDeviceIntegration/MSBuildDeviceIntegration.dll",
78
],
89
"cmake.configureOnOpen": false
910
}

Documentation/guides/building-apps/build-process.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,20 @@ In broad terms, there are two types of Android application packages
3636
Not coincidentally, these match the MSBuild `Configuration` which
3737
produces the package.
3838

39-
## Shared Runtime
40-
41-
The *shared runtime* is a pair of additional Android packages which
42-
provide the Base Class Library (`mscorlib.dll`, etc.) and the
43-
Android binding library (`Mono.Android.dll`, etc.). Debug builds
44-
rely upon the shared runtime in lieu of including the Base Class Library and
45-
Binding assemblies within the Android application package, allowing the
46-
Debug package to be smaller.
47-
48-
The shared runtime may be disabled in Debug builds by setting the
49-
[`$(AndroidUseSharedRuntime)`](~/android/deploy-test/building-apps/build-properties.md#androidusesharedruntime)
50-
property to `False`.
51-
5239
<a name="Fast_Deployment"></a>
5340

5441
## Fast Deployment
5542

56-
*Fast deployment* works in concert with the shared runtime to further
57-
shrink the Android application package size. This is done by not
58-
bundling the app's assemblies within the package. Instead, they are
59-
copied onto the target via `adb push`. This process speeds up the
43+
*Fast deployment* works by further shrinking Android application
44+
package size. This is done by not bundling the app's assemblies
45+
within the package. Instead, the are deployed directly to the
46+
application internal `files` directory. This process speeds up the
6047
build/deploy/debug cycle because if *only* assemblies are changed,
6148
the package is not reinstalled. Instead, only the updated assemblies are
6249
re-synchronized to the target device.
6350

64-
Fast deployment is known to fail on devices which block `adb` from
65-
synchronizing to the directory
66-
`/data/data/@PACKAGE_NAME@/files/.__override__`.
51+
Fast deployment is known to fail on devices which block `run-as`. This
52+
is usually devices of API 20 and lower.
6753

6854
Fast deployment is enabled by default, and may be disabled in Debug builds
6955
by setting the `$(EmbedAssembliesIntoApk)` property to `True`.

Documentation/guides/building-apps/build-properties.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ compiler.
418418

419419
Added in Xamarin.Android 10.2.
420420

421+
<a name="AndroidFastDeploymentType"></a>
422+
421423
## AndroidFastDeploymentType
422424

423425
A `:` (colon)-separated list
@@ -433,8 +435,8 @@ faster.) Valid values include:
433435

434436
- `Assemblies`: Deploy application assemblies.
435437

436-
- `Dexes`: Deploy `.dex` files, Android Resources, and Android
437-
Assets. **This value can *only* be used on devices running
438+
- `Dexes`: Deploy `.dex` files, native libraries and typemaps.
439+
**This value can *only* be used on devices running
438440
Android 4.4 or later (API-19).**
439441

440442
The default value is `Assemblies`.
@@ -1002,18 +1004,6 @@ than `aapt`.
10021004

10031005
Added in Xamarin.Android 8.1.
10041006

1005-
## AndroidUseSharedRuntime
1006-
1007-
A boolean property that
1008-
determines whether the *shared runtime packages* are required in
1009-
order to run the Application on the target device. Relying on the
1010-
shared runtime packages allows the Application package to be
1011-
smaller, speeding up the package creation and deployment process,
1012-
resulting in a faster build/deploy/debug turnaround cycle.
1013-
1014-
This property should be `True` for Debug builds, and `False` for
1015-
Release projects.
1016-
10171007
## AndroidVersionCodePattern
10181008

10191009
A string property which allows

Documentation/guides/messages/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ ms.date: 01/24/2020
6969
+ [XA0122](xa0122.md): Assembly '{assembly}' is using a deprecated attribute '[assembly: Java.Interop.DoNotPackageAttribute]'. Use a newer version of this NuGet package or notify the library author.
7070
+ XA0123: Removing {issue} from {propertyName}. Lint {version} does not support this check.
7171
+ [XA0124](xa0124.md): Interpreter is not supported by the x86 ABI
72+
+ [XA0125](xa0125.md): `{Project}` is using a deprecated debug information level.
73+
Set the debugging information to Portable in the Visual Studio project property pages or edit the project file in a text editor and set the 'DebugType' MSBuild property to 'portable' to use the newer, cross-platform debug information level.
74+
If this file comes from a NuGet package, update to a newer version of the NuGet package or notify the library author.
75+
+ [XA0126](xa0126.md): Error installing FastDev Tools. This device does not support Fast Deployment. Please rebuild your app using `EmbedAssembliesIntoApk = True`.
76+
+ [XA0127](xa0127.md): There was an issue deploying {destination} using {FastDevTool}. We encountered the following error {output}. Please rebuild your app using `EmbedAssembliesIntoApk = True`.
77+
+ [XA0128](xa0128.md): Stdio Redirection is enabled. Please disable it to use Fast Deployment.
78+
+ [XA0129](xa0129.md): Error deploying `{File}`. Please disable fast deployment in the Visual Studio project property pages or edit the project file in a text editor and set the 'EmbedAssembliesIntoApk' MSBuild property to 'true'.
79+
+ [XA0130](xa0130.md): Sorry. Fast deployment is only supported on devices running Android 5.0 (API level 21) or higher.
80+
Please disable fast deployment in the Visual Studio project property pages or edit the project file in a text editor and set the 'EmbedAssembliesIntoApk' MSBuild property to 'true'.
7281

7382
## XA1xxx: Project related
7483

@@ -233,6 +242,7 @@ and `NNN` is a 3 digit number indicating the type of the unhandled `Exception`.
233242
* `DES` - `Desugar`
234243
* `DJL` - `DetermineJavaLibrariesToCompile`
235244
* `DX8` - `D8`
245+
* `FD` - `FastDeploy`
236246
* `FLB` - `FindLayoutsToBind`
237247
* `FLT` - `FilterAssemblies`
238248
* `GAD` - `GetAndroidDefineConstants`

Documentation/guides/messages/xa0119.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@ Remove the following options from `Debug` configurations:
3131

3232
* `<AndroidLinkMode>None</AndroidLinkMode>`
3333
* `<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>`
34-
* `<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>`
3534

3635
*DO* use the following options for `Release` configurations:
3736

3837
* `<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>`
39-
* `<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>`
4038

4139
Consider submitting a [bug][bug] if you are getting one of these
4240
warnings under normal circumstances.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Xamarin.Android error XA0126
3+
description: XA0126 error code
4+
ms.date: 08/07/2020
5+
---
6+
# Xamarin.Android error XA0126
7+
8+
## Issue
9+
10+
This issue happens when you are trying to use fast deployment on a device which
11+
does not support it. Fast deployment requires features which are not available
12+
on devices running API 20 or lower. The Fast Deployment system makes use of the
13+
[`run-as`](https://android.googlesource.com/platform/system/core.git/+/refs/heads/master/run-as/run-as.cpp#42) feature of the Android OS. This feature was either not available or had
14+
limited capabilities in API 20 and earlier.
15+
16+
## Solution
17+
18+
Disable Fast Deployment by setting `EmbedAssembliesIntoApk = True` in your .csproj.
19+
Or turn off `Fast Deployment` in the IDE. You will still be able to debug on the device,
20+
all the required files will be packaged inside the .apk.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Xamarin.Android error XA0127
3+
description: XA0127 error code
4+
ms.date: 08/07/2020
5+
---
6+
# Xamarin.Android error XA0127
7+
8+
## Issue
9+
10+
If you encounter this issue something unexpected happened with the Fast Deployment
11+
native tooling. This is most likely to be a native crash.
12+
13+
## Solution
14+
15+
To work around the issue disable Fast Deployment by setting `EmbedAssembliesIntoApk = True`
16+
in your .csproj. Or turn off `Fast Deployment` in the IDE. You will still be able to debug
17+
on the device, all the required files will be packaged inside the .apk.
18+
19+
In addition raise an issue at [https://github.com/xamarin/xamarin-android/issues/new/choose](https://github.com/xamarin/xamarin-android/issues/new/choose). Please provide the deployment log and as much detail as possible.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Xamarin.Android error XA0128
3+
description: XA0128 error code
4+
ms.date: 08/07/2020
5+
---
6+
# Xamarin.Android error XA0128
7+
8+
## Issue
9+
10+
The Fast Deployment system relys on reading the output from the various system applications
11+
on the device. This is done by reading `System.out`, which by default is where all output
12+
will be redirected. If `log.redirect-stdio` this will cause all of the Fast Deployment tooling
13+
to fail.
14+
15+
## Solution
16+
17+
Disable the redirection of stdio in order to use Fast Deployment. This can be done using
18+
the following commands.
19+
20+
```
21+
adb shell stop
22+
adb shell setprop log.redirect-stdio false
23+
adb shell start
24+
```
25+
26+
Depending on the device you might need to run `adb root` before running the above commands.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
title: Xamarin.Android error XA0129
2+
description: XA0129 error code
3+
ms.date: 08/07/2020
4+
---
5+
# Xamarin.Android error XA0129
6+
7+
## Issue
8+
9+
This issue happens when you are trying to use fast deployment on a device which
10+
does not support it. In this case both the normal and backup types of fast
11+
deployment failed. The Fast Deployment system makes use of the
12+
[`run-as`](https://android.googlesource.com/platform/system/core.git/+/refs/heads/master/run-as/run-as.cpp#42) feature of the Android OS. This feature was either not available or had
13+
limited capabilities in API 20 and earlier
14+
15+
## Solution
16+
17+
Disable Fast Deployment by setting `EmbedAssembliesIntoApk = True` in your .csproj.
18+
Or turn off `Fast Deployment` in the IDE. You will still be able to debug on the device,
19+
all the required files will be packaged inside the .apk.

0 commit comments

Comments
 (0)