This repository was archived by the owner on Oct 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
This repository was archived by the owner on Oct 25, 2021. It is now read-only.
GenerateJavaStubs is invoked before initializing supported frameworks appropriately #567
Copy link
Copy link
Open
Description
I think the root cause of the problem is the same as #530 but current code base is implemented to invoke non-public features and targets in Xamarin.Android build tasks (which you are not supposed to do of course) and thus it runs GenerateJavaStubs task before appropriate supported frameworks.
Namely, GenerateJavaStubs.proj build fails at:
Error executing task GenerateJavaStubs: System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Android.Tasks.ManifestDocument.Merge (System.Collections.Generic.List`1[T] subclasses, System.Collections.Generic.List`1[T] selectedWhitelistAssemblies, System.String applicationClass, System.Boolean embed, System.String bundledWearApplicationName, System.Collections.Generic.IEnumerable`1[T] mergedManifestDocuments) [0x00382] in /sources/xamarin-android/src/Xamarin.Android.Build.Tasks/Utilities/ManifestDocument.cs:270
at Xamarin.Android.Tasks.GenerateJavaStubs.Run (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x004b0] in /sources/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaStubs.cs:227
at Xamarin.Android.Tasks.GenerateJavaStubs.Execute () [0x0023a] in /sources/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaStubs.cs:91
at Microsoft.Build.BuildEngine.TaskEngine.Execute () [0x00000] in /sources/mono/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs:134
at Microsoft.Build.BuildEngine.BuildTask.Execute () [0x0008d] in /sources/mono/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTask.cs:101
Done building target "Build" in project "/home/atsushi/Desktop/TextToSpeechPlugin-master/e4k/android/GenerateJavaStubs.proj" ("/home/atsushi/Desktop/TextToSpeechPlugin-master/e4k/android/GenerateJavaStubs.proj").
Target performance summary:
3.341 ms _CheckForInvalidConfigurationAndPlatform 1 calls
895.380 ms Build 1 calls
Tasks performance summary:
183.372 ms ResolveAssemblies 1 calls
709.865 ms GenerateJavaStubs 1 calls
Build FAILED.
The NRE is caused by accessing MonoAndroidHelper.SupportedVersions which is null.