Repository navigation
[Xamarin.Android.Build.Tasks] Seeing new AAPT0000 errors when building certain projects against master - #275
Merged
Merged
Conversation
…g certain projects against master Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=45137 This is a weird bug. When building from the commandline using xbuild/msbuild or from VS the system behaves as it should do. But when building from XS it seems the DesignTimeBuild value is being reset to ''. This results in the required target GetAdditionalResourcesFromAssemblies from being run when it should, which results in the following errors error APT0000: No resource identifier found for attribute 'foo.foo' This commit is part of another one which will be included in the monodroid repo. It alters the condition of for the GetAdditionalResourcesFromAssemblies target to let it run when $(DesignTimeBuild) is 'false' or ''. Which means it will not run when the IDE's pass $(DesignTimeBuild) = 'true' (which they currently do).
Contributor
|
Why shouldn't this be merged? |
Contributor
Author
|
@jonpryor I was just double checking something and didn't want this merged too early. Its ready now |
radical
pushed a commit
that referenced
this pull request
May 8, 2018
…275) Context: https://github.com/xamarin/xamarin-android/projects/1 Updated the generator to generate helper marshaling methods for classes implementing `Java.Interop.IJavaPeerable` interface and their methods with `Android.Runtime.RegisterAttribute` custom attribute. Plus `__RegisterNativeMembers()` method to register these methods during runtime. The `JniRuntime.JniMarshalMemberBuilder.cs` change is a workaround for a Mono BCL bug, which causes this exception: Error: jnimarshalmethod-gen: Unable to process assembly '…/obj/Debug/android/assets/Mono.Android.dll' Index was outside the bounds of the array. System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Attribute.InternalParamGetCustomAttributes (System.Reflection.ParameterInfo parameter, System.Type attributeType, System.Boolean inherit) [0x0005b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/attribute.cs:60 at System.Attribute.GetCustomAttributes (System.Reflection.ParameterInfo element, System.Type attributeType, System.Boolean inherit) [0x0008b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/attribute.cs:681 at System.Attribute.GetCustomAttribute (System.Reflection.ParameterInfo element, System.Type attributeType, System.Boolean inherit) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/attribute.cs:749 at System.Attribute.GetCustomAttribute (System.Reflection.ParameterInfo element, System.Type attributeType) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/attribute.cs:742 at System.Reflection.CustomAttributeExtensions.GetCustomAttribute (System.Reflection.ParameterInfo element, System.Type attributeType) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/reflection/CustomAttributeExtensions.cs:22 at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T] (System.Reflection.ParameterInfo element) [0x00000] in <e36d106f4822473d8910305e5d059e11>:0 at Java.Interop.JniRuntime+JniMarshalMemberBuilder.GetParameterMarshaler (System.Reflection.ParameterInfo parameter) [0x0001f] in …/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniRuntime.JniMarshalMemberBuilder.cs:138 at Java.Interop.MarshalMemberBuilder.CreateMarshalToManagedExpression (System.Reflection.MethodInfo method, Java.Interop.JavaCallableAttribute callable, System.Type type) [0x002f1] in …/xamarin-android/external/Java.Interop/src/Java.Interop.Export/Java.Interop/MarshalMemberBuilder.cs:182 at Java.Interop.MarshalMemberBuilder.CreateMarshalToManagedExpression (System.Reflection.MethodInfo method) [0x00014] in …/git/clean-full/xamarin-android/external/Java.Interop/src/Java.Interop.Export/Java.Interop/MarshalMemberBuilder.cs:32 at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.CreateMarshalMethodAssembly (System.String path) [0x00272] in …/xamarin-android/external/Java.Interop/tools/jnimarshalmethod-gen/App.cs:183 at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.Main (System.String[] args) [0x001a5] in …/xamarin-android/external/Java.Interop/tools/jnimarshalmethod-gen/App.cs:67
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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=45137
This is a weird bug. When building from the commandline using
xbuild/msbuild or from VS the system behaves as it should do.
But when building from XS it seems the DesignTimeBuild value
is being reset to ''. This results in the required target
GetAdditionalResourcesFromAssemblies from being run when it should,
which results in the following errors
This commit is part of another one which will be included in the
monodroid repo. It alters the condition of for the GetAdditionalResourcesFromAssemblies
target to let it run when $(DesignTimeBuild) is 'false' or ''.
Which means it will not run when the IDE's pass $(DesignTimeBuild) = 'true'
(which they currently do).