3

So, I have two machines.. my Desktop PC (VisualStudio.15.Release/15.2.0+26430.13) and I have a Laptop (VS 15.3.3). Both have Xamarin Installed in the very same manner with the same settings and directories.

I have a project which was running just fine on my PC, but gave "java.exe exited with code 1" on my laptop, which was weird enough. So, after checking the output and then search internet, I found that I needed to update "ProGuard" (Even though I haven't checked it in my project properties). I updated it and re-built my project (after cleaning the build).

I then ran my project in hope that it'll run. Now, I'm left with a new error saying :

Unable to access jarfile E:\My Project Name\packages\name.atsushieno.proguard.facebook.5.3.2.2\build\..lib\proguard.jar

I thought it might be some privilege issue with VS? So, I restarted VS as an admin. Cleaned the build, re-built it and got the same error.

I looked around for that error and found this in bugzila of Xamarin.

According to them, the issue is fixed, but I have latest VS and Xamarin. What could be the issue and the Fix.

Please help me if any one has some ideas why this might be happening.

EDIT 1 : One of my team member is also having the same exact same issue.

EDIT 2 :

Just double checked all this. My Proguard's Path : C:\Android\android-sdk\tools\proguard\

inside the \lib folder, there is proguard.jar file and proguardgui.jar.

I have also made a system environment variable for Proguard and it's fine as well.

And yes, I have Java installed as well : java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Java is also in my path. I've just updated my support libraries and have the latest build tools from SDK Manager. Still the same thing.

I followed this StackOverFlow answer to update ProGuard

Xonshiz
  • 1,307
  • 2
  • 20
  • 48
  • Maybe you could read this : https://stackoverflow.com/questions/22498111/proguard-error-android-unable-to-access-jar-file – York Shen Aug 31 '17 at 14:22

1 Answers1

0

After 2 days of searching through all those SO answers and Google Forums regarding changing the relative path of proguard to an absolute one, which didn't work, I followed these things and it worked.

1.) Made a system variable for Proguard and added it in the path.

2.) Made sure that the path for "Android-SDK" and "Android-NDK" did not have any special character/spaces in it.

3.) Installed "Universal Xamarin Installer", which pretty much updates the NDKs and everything else.

4.) Re-installed my Phone's drivers.

5.) Updated each and every android-sdk image/package.

And rebooted by Laptop after every step. I'm not sure which one worked, but it did solve my problem.

P.S : Seems like android.v7.support installs this "atsushieno.proguard.facebook" package. I was not using anything related to it anywhere. So, if the above steps don't work, you could try by un-installing this Package.

Xonshiz
  • 1,307
  • 2
  • 20
  • 48