我有一个xamarin.form PCL。
App build在DEBUG中查找并正常工作。 我想启用“ProGuard”功能。
但出现以下错误:
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,3): error MSB6006: "java.exe" exited with code 1.
我做了什么:
无法找到任何其他错误。
Android项目包含 -proguard.cfg
# General Android
-dontwarn org.apache.http.**
-dontwarn android.net.http.AndroidHttpClient
我在Xamarin.android.Common.targets中检查了第2053行:
<Proguard
Condition="'$(AndroidEnableProguard)' == 'True' and '$(_ProguardProjectConfiguration)' != ''"
ProguardJarPath="$(ProguardJarPath)"
AndroidSdkDirectory="$(_AndroidSdkDirectory)"
JavaToolPath="$(JavaToolPath)"
ProguardToolPath="$(ProguardToolPath)"
ToolExe="$(ProguardToolExe)"
UseProguard="$(UseProguard)"
JavaPlatformJarPath="$(JavaPlatformJarPath)"
ClassesOutputDirectory="$(IntermediateOutputPath)android\bin\classes"
AcwMapFile="$(_AcwMapFile)"
ProguardCommonXamarinConfiguration="$(IntermediateOutputPath)proguard\proguard_xamarin.cfg"
ProguardGeneratedReferenceConfiguration="$(_ProguardProjectConfiguration)"
ProguardGeneratedApplicationConfiguration="$(IntermediateOutputPath)proguard\proguard_project_primary.cfg"
ProguardConfigurationFiles="$(ProguardConfigFiles)"
JavaLibrariesToEmbed="@(_JavaLibrariesToCompile);@(_InstantRunJavaReference)"
ExternalJavaLibraries="@(AndroidExternalJavaLibrary)"
DoNotPackageJavaLibraries="@(_ResolvedDoNotPackageAttributes)"
ProguardJarOutput="$(IntermediateOutputPath)proguard\__proguard_output__.jar"
EnableLogging="$(ProguardEnableLogging)"
DumpOutput="$(IntermediateOutputPath)proguard\dump.txt"
PrintSeedsOutput="$(IntermediateOutputPath)proguard\seeds.txt"
PrintUsageOutput="$(IntermediateOutputPath)proguard\usage.txt"
PrintMappingOutput="$(IntermediateOutputPath)proguard\mapping.txt"
/>
使用最新版本进行编译 敏:23 目标:使用编译SDK版本
VS2015 NDK和SDK引用是正确的,因为我可以在DEBUG中生成构建。
详细:诊断
3>C:\TEST_TFS\XXXX.XXXXX-XXXX-XXXX\XXXXX-XXXX-XXXX-branch-no-auth\APP.XXXXX.XXXX\APP.XXXXX.XXXX.Droid\AWClient-SDK.dll : warning XA0101: @(Content) build action is not supported
3>C:\TEST_TFS\XXXX.XXXXX-XXXX-XXXX\XXXXX-XXXX-XXXX-branch-no-auth\APP.XXXXX.XXXX\APP.XXXXX.XXXX.Droid\LocalDb\DatabaseConnection_Android.cs(22,30,22,32): warning CS0168: The variable 'ex' is declared but never used
3>C:\TEST_TFS\XXXX.XXXXX-XXXX-XXXX\XXXXX-XXXX-XXXX-branch-no-auth\APP.XXXXX.XXXX\APP.XXXXX.XXXX.Droid\PCL\PlatformStyleBO.cs(19,24,19,44): warning CS0169: The field 'PlatformStyleBO._buttonHeightRequest' is never used
3> APP.XXXXX.XXXX.Droid -> C:\TEST_TFS\XXXX.XXXXX-XXXX-XXXX\XXXXX-XXXX-XXXX-branch-no-auth\APP.XXXXX.XXXX\APP.XXXXX.XXXX.Droid\bin\Release\APP.XXXXX.XXXX.Droid.dll
3>C:\TEST_TFS\SSSSS.XXXXX-XXXX-XXXX\XXXXX-XXXX-XXXX-branch-no-auth\APP.XXXXX.XXXX\APP.XXXXX.XXXX.Droid\APP.XXXXX.XXXX.Droid.csproj : warning XA0105: The $(TargetFrameworkVersion) for FormsViewGroup.dll (vv8.0) is greater than the $(TargetFrameworkVersion) for your project (v7.1). You need to increase the $(TargetFrameworkVersion) for your project.
3>C:\TEST_TFS\SSSSS.XXXXX-XXXX-XXXX\XXXXX-XXXX-XXXX-branch-no-auth\APP.XXXXX.XXXX\APP.XXXXX.XXXX.Droid\APP.XXXXX.XXXX.Droid.csproj : warning XA0105: The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (vv8.0) is greater than the $(TargetFrameworkVersion) for your project (v7.1). You need to increase the $(TargetFrameworkVersion) for your project.
3>C:\TEST_TFS\SSSSS.XXXXX-XXXX-XXXX\XXXXX-XXXX-XXXX-branch-no-auth\APP.XXXXX.XXXX\APP.XXXXX.XXXX.Droid\APP.XXXXX.XXXX.Droid.csproj : warning XA0105: The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (vv8.0) is greater than the $(TargetFrameworkVersion) for your project (v7.1). You need to increase the $(TargetFrameworkVersion) for your project.
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2053,3): error MSB6006: "java.exe" exited with code 1.