Hello Guys
I got an issue when switching my Xamarin.Forms project from VSMac to VsWindows!
"java.exe" exited with code 2 when deploying.
I already try:
- delete bin/ obj/ folders
- remove all packages and re-add them
- MultiDex
- Verify the path (removing special char "!@#$%ˆ&*(-_" etc..)
If you got an idea, tell me ;)
Regards,
If G Clovs solution doesn't work, then:
- make sure the netstandard on your mac is exactly the same on your Windows pc.
- Make sure you have the same Android SDK downloaded on your Windows - through Tools Menu > SDK manager.
- If you are using stable channel for vs for mac updates, then make sure you are not suing the preview of budget packages on your Windows.
- Apply the same logic in 3 for preview channel.
To avoid all these issues:
- Simply go to vs for mac 2019, change to stable build and update the vs for mac to latest.
- Update all android SDK and build tools to say v28
- Update all nugget packages for the two projects and build successfully.
- Go to vs 2019 and update vs to latest.
- Repeat step 2 for vs.
- Deselect preview in nugget package manager, and update nugget packages in the two projects.
- Build successful.
Try the below steps, it was working for me.
- Open Visual Studio in Windows
- Open your Solution
- Find for "Resource.designer.cs" file in Android Project and delete it
- Remove obj and debug folders form PCL and Android project
- Clean and Rebuild
Happy Coding :)
Kishore Kumar
With turning third page of google, I didn't find any answer.
But I found the answer by my own.
The issue was comming from the Android.csproj and the Keystore Path.
It was set to my Mac Path even if I had already changed it on
VSWindows AndroidProject => Properties => Signin
So I removed this lines on Android.csproj (edited with third text editor):
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidSigningKeyStore>YourMacPath/Alias.keystore</AndroidSigningKeyStore>
<AndroidSigningStorePass>Password</AndroidSigningStorePass>
<AndroidSigningKeyAlias>Alias</AndroidSigningKeyAlias>
<AndroidSigningKeyPass>AliasPassword</AndroidSigningKeyPass>
On debug & release Part.
Then you can edit them on VS Windows.
Hope I helped someone.
See ya