infinitespace-studios / XamarinLegacyDynamicAssetsExample

An Example of using Dynamic Asset Delivery with Xamarin Android.
MIT License
9 stars 1 forks source link

aapt2.exe not working with --output-to-dir #3

Closed TommiGustafsson-HMP closed 2 years ago

TommiGustafsson-HMP commented 2 years ago

Hi! I get an error when running aapt2.exe. It says:

error: failed to write assets/Foo.txt to archive: The system cannot find the file specified. (2).

This appears because of using --output-to-dir command line parameter. How did you get this working?

(I've confirmed that this is not working even with the latest aapt2.exe downloaded from Google Maven.)

(I am on Windows 11, if that matters.)

(It works on Linux, though.)

I got everything working using aapt2 on WSL and then importing the resulting zip file to the project using the following:

  <ItemGroup>
    <AndroidAppBundleModules Include="C:\assetpack\assets.zip" />
  </ItemGroup>

This is a manual solution though.

dellis1972 commented 2 years ago

ok, so the windows aapt2 doesn't support this. I'll revert to the old code when I get back from Holidays.

dellis1972 commented 2 years ago

I reverted the code which uses the --output-to-dir flag to the original version which creates a zip and then extracts the data. We can re-enable the new flag once it makes it into the windows version of aapt2.