Xamarin.forms构建错误" aapt.exe"退出代码-1073741819

时间:2016-06-28 12:04:34

标签: android msbuild xamarin.android xamarin.forms portable-class-library

我正在使用 Xamarin.Forms ,但我从 eclipse 更新了Android SD管理器,然后我收到以下错误:

  

Xamarin.forms构建错误" aapt.exe"退出代码-1073741819

以下文件出错: \的MSBuild \ Xamarin \的Android \ Xamarin.Android.Common.targets

<!-- Run aapt to generate R.java -->
    <Aapt Condition="'$(_AndroidResourceDesignerFile)' != ''"
        ImportsDirectory="$(_LibraryProjectImportsDirectoryName)"
        OutputImportDirectory="$(IntermediateOutputPath)__library_projects__\"
        UseShortFileNames="$(UseShortFileNames)"
        JavaPlatformJarPath="$(JavaPlatformJarPath)"
        ManifestFile="$(ResgenTemporaryDirectory)\AndroidManifest.xml"
        PackageName="$(_AndroidPackage)"
        ApplicationName="$(_AndroidPackage)"
        ResourceDirectory="$(MonoAndroidResDirIntermediate)"
        JavaDesignerOutputDirectory="$(ResgenTemporaryDirectory)"
        ResourceOutputFile="$(ResgenTemporaryDirectory)\resources.apk"
        ExtraPackages="$(AaptExtraPackages)"
        AdditionalResourceDirectories="@(LibraryResourceDirectories)"
        LibraryProjectJars="@(ExtractedJarImports)"
        ExtraArgs="$(AndroidResgenExtraArgs)"
        ToolPath="$(AaptToolPath)"
        ToolExe="$(AaptToolExe)"
        AdditionalAndroidResourcePaths="@(_AdditonalAndroidResourceCachePaths)"
        ApiLevel="$(_AndroidTargetSdkVersion)"
        AndroidUseLatestPlatformSdk="$(AndroidUseLatestPlatformSdk)"
        ResourceNameCaseMap="$(_AndroidResourceNameCaseMap)"
        ExplicitCrunch="$(AndroidExplicitCrunch)"
    />
  <Aapt
    ImportsDirectory="$(_LibraryProjectImportsDirectoryName)"
    OutputImportDirectory="$(IntermediateOutputPath)__library_projects__\"
    UseShortFileNames="$(UseShortFileNames)"
    JavaPlatformJarPath="$(JavaPlatformJarPath)"
    ManifestFile="$(IntermediateOutputPath)android\AndroidManifest.xml"
    ResourceDirectory="$(MonoAndroidResDirIntermediate)"
    JavaDesignerOutputDirectory="$(AaptTemporaryDirectory)"
    ResourceOutputFile="$(_PackagedResources)"
    ExtraPackages="$(AaptExtraPackages)"
    AdditionalResourceDirectories="@(LibraryResourceDirectories)"
    ExtraArgs="$(AndroidResgenExtraArgs)"
    PackageName="$(_AndroidPackage)"
    ApplicationName="$(_AndroidPackage)"
    UncompressedFileExtensions="$(AndroidStoreUncompressedFileExtensions)"
    AssetDirectory="$(MonoAndroidAssetsDirIntermediate)"
    ToolPath="$(AaptToolPath)"
    ToolExe="$(AaptToolExe)"
    AdditionalAndroidResourcePaths="@(_AdditonalAndroidResourceCachePaths)"
    ApiLevel="$(_AndroidTargetSdkVersion)"
    AndroidUseLatestPlatformSdk="$(AndroidUseLatestPlatformSdk)"
    ResourceNameCaseMap="$(_AndroidResourceNameCaseMap)"
    SupportedAbis="$(_BuildTargetAbis)"
    CreatePackagePerAbi="$(AndroidCreatePackagePerAbi)"
    ExplicitCrunch="$(AndroidExplicitCrunch)"
     />

1 个答案:

答案 0 :(得分:1)

验证您是否在SDK Manager中安装了正确的目标SDK框架级别。我在构建期间看到了类似的错误,其中一些错过了。