Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Name cannot begin with the '$' character, hexadecimal value 0x24

Tags:

I have this warning that never goes away and I don't know how to get it fixed:

Warning Name cannot begin with the '$' character, hexadecimal value 0x24.

.Android C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1668 Build

After enabling detailed verbosity, it points to this section of the Xamarin.Android.Common.targets file:

<Target Name="_GenerateJavaStubs" DependsOnTargets="_SetLatestTargetFrameworkVersion;_PrepareAssemblies;$(_AfterPrepareAssemblies)" Inputs="$(MSBuildAllProjects);@(_ResolvedAssemblies);$(_AndroidManifestAbs);$(_AndroidBuildPropertiesCache)" Outputs="$(IntermediateOutputPath)android\AndroidManifest.xml;$(_AcwMapFile);$(_AndroidTypeMappingJavaToManaged);$(_AndroidTypeMappingManagedToJava)">
  <GenerateJavaStubs ResolvedAssemblies="@(_ResolvedAssemblies)" ResolvedUserAssemblies="@(_ResolvedUserAssemblies)" ManifestTemplate="$(_AndroidManifestAbs)" MergedManifestDocuments="@(ExtractedManifestDocuments)" Debug="$(AndroidIncludeDebugSymbols)"
    NeedsInternet="$(AndroidNeedsInternetPermission)" AndroidSdkPlatform="$(_AndroidApiLevel)" AndroidSdkDir="$(_AndroidSdkDirectory)" PackageName="$(_AndroidPackage)" ManifestPlaceholders="$(AndroidManifestPlaceholders)" OutputDirectory="$(IntermediateOutputPath)android"
    MergedAndroidManifestOutput="$(IntermediateOutputPath)android\AndroidManifest.xml" UseSharedRuntime="$(AndroidUseSharedRuntime)" EmbedAssemblies="$(EmbedAssembliesIntoApk)" ResourceDirectory="$(MonoAndroidResDirIntermediate)" BundledWearApplicationName="$(BundledWearApplicationPackageName)"
    PackageNamingPolicy="$(AndroidPackageNamingPolicy)" ApplicationJavaClass="$(AndroidApplicationJavaClass)" AcwMapFile="$(_AcwMapFile)">
  </GenerateJavaStubs>
  <ConvertResourcesCases ResourceDirectories="$(MonoAndroidResDirIntermediate)" AcwMapFile="$(_AcwMapFile)" />
</Target>

I have no idea if I need to modify this or if one of my files is causing the issue. I double checked, none of my files actually start with a $.

Any ideas?

Thank you.

like image 880
E. Bourque Avatar asked Jul 20 '17 09:07

E. Bourque


1 Answers

Seems to be a Xamarin bug, at least in some circumstances. Logged Github issues here and here with repro steps and a sample project.

like image 91
Nate Cook Avatar answered Oct 14 '22 00:10

Nate Cook