Commit bc63326
[Xamarin.Android.Build.Tasks] @(LibraryResourceDirectories)+R.java (#744)
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58721
The initial problem seems to stem from the fact that for the support
library components now directly include the resources. As a result
the `_GenerateJavaResourcesForComponent` target was not running. This
was because it was only running if
`$(_AdditonalAndroidResourceCachePaths)` was not empty. In this
scenario it was always empty.
As a result none of the files like `R.java` files were generated for
the support libraries. The means the final `.class` files did not
have references for the `R$drawable.foo` identifiers.
This results in a crash:
Java.Lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$drawable;
Fix the problem by looking at `@(LibraryResourceDirectories)` to see
if we have any `AndroidManifest.xml` files. We should then process
these directories to ensure that the `R.java` files are created and
included compiled into the final applications.1 parent e1c0436 commit bc63326
File tree
3 files changed
+89
-4
lines changed- src/Xamarin.Android.Build.Tasks
- Tests
- Xamarin.Android.Build.Tests
- Xamarin.ProjectTools/Android
3 files changed
+89
-4
lines changedLines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
113 | 136 | | |
114 | 137 | | |
115 | 138 | | |
| |||
Lines changed: 63 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
139 | 148 | | |
140 | 149 | | |
141 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
142 | 205 | | |
143 | 206 | | |
144 | 207 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1211 | 1211 | | |
1212 | 1212 | | |
1213 | 1213 | | |
1214 | | - | |
1215 | | - | |
| 1214 | + | |
1216 | 1215 | | |
1217 | 1216 | | |
1218 | 1217 | | |
| |||
1221 | 1220 | | |
1222 | 1221 | | |
1223 | 1222 | | |
1224 | | - | |
| 1223 | + | |
1225 | 1224 | | |
1226 | 1225 | | |
1227 | 1226 | | |
| |||
0 commit comments