dotnet / dotnet/android

`D8` invocation doesn't use response files

Open
#9,515 1 comment 1 reaction 2 assignees Claimed by @jonathanpeppers View on GitHub
Area: App+Library Build bug
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 20h
Merged PRs (30d)
257

Description

If you reference enough of our library bindings NuGet packages, the command line to `d8`/`java` gets too long and throws an error:

```
Command 'build -c Release -bl' failed with exit code 1.
Errors:
MSB6003: The specified task executable "java.exe" could not be run. System.ComponentModel.Win32Exception (206): An error occurred trying to start process 'C:\Program Files (x86)\Android\openjdk\jdk-17.0.8.101-hotspot\bin\java.exe' with working directory 'D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest'. The filename or extension is too long. [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6003: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6003: at Microsoft.Build.Utilities.ToolTask.StartToolProcess(Process proc) [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6003: at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6003: at Microsoft.Build.Utilities.ToolTask.Execute() [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
Warnings:
APT2000: warn: removing resource com.companyname.AllPackagesTest:string/action_bar_expand_collapse_button without required default value. [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
APT2000: warn: removing resource com.companyname.AllPackagesTest:string/action_bar_expand_collapse_button without required default value. [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
MSB6002: The command-line for the "D8" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "D8" into multiple calls with fewer parameters per call. [D:\a_work\1\s\output\tests\allpackages\android\AllPackagesTest\AllPackagesTest.csproj]
```

Does `java` support response files to get around this issue?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.