[Xamarin.Android.Build.Tasks] [Smoke][VS 2017] Exception on deploying CheeseSquare sample #744
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
_GenerateJavaResourcesForComponentwas notrunning. This was because it was only running if
_AdditonalAndroidResourceCachePathswas 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.
So to fix the problem we need to start looking at the
@(LibraryResourceDirectories)to see if we have anyAndroidManifest.xml files. We should then process these
directories to ensure that the R.java files are created.
The finally compiled into the final applications.