Quick Links

Enable Proguard error 'C:\Program Files (Access is Denied)'

In an attempt to size down my APK package I noticed that Xamarin now has built-in support for Proguard, awesome!

However I can't get it to work, which is not so awesome.

While building it gives me the error 'C:\Program Files (Access is Denied)'. It looks to me like an error because of the fact that the path contains spaces.
I've tried to edit my Java SDK path to the 8.3 notation but looking at the Output Window (see below), Xamarin still uses some other paths which I can't influence (at least not that I know of).

Running from a separate command-line with all 'Program Files (x86)' replaced by 'Progra~2', produces a valid error message which probably is because it isn't part of the build process anymore.

I did run into same problem. I ran C:\Windows\system32>mklink /J C:\ProgramFiles\Android "C:\Program Files (x86)\An
droid" to link C:\Program Files (x86)\Android to C:\ProgramFiles\Android, but the build is still looking at the C:\Program Files (x86)\Android\android-sdk\tools\proguard\lib\proguard.jar folder? What did I do wrong. BTW, the provided link to the "fix" is very confusing since it doesn't tell what map to what, it just say "just create a sym-link to a path without spaces". I did exactly that, but no luck... Any advice anyone? I don't have mac to build the app, i need to fix it on windows.

What a dodgy, nasty hack to have to do. Xamarin should have this all sorted OOTB.

I ran this command: mklink /D c:\ProgFiles86 "c:\Program files (x86)"

And then went into VS -> Settings -> Xamarin -> and changed the Java SDK folder to exactly what it was, but using the new C:\ProgFiles86..... path. Then rebuilt the project, and it now got past the Access Denied error, but is now throwing a new one "java.exe" exited with code 1.