“Java.exe” exited with code 1 (Proguard issue)

白昼怎懂夜的黑 提交于 2019-11-28 12:37:26

Just update proguard from official site http://proguard.sourceforge.net/ (replace folder in $SDK_DIR/tools/proguard/)

You can see the problem here:

Caused by: java.io.IOException: Can't process class [java/nio/charset/CharsetDecoder.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7))

Solution: Change your Java target to 7 (1.7).

Manohar
**Error : while running app “Java.exe” exited with code**

I resolved this by manually overriding the java heap size: In Visual Studio:

  1. Right-click on Project
  2. Click on Android properties
  3. Click on Android Options
  4. Select Advanced tab then Advanced android build settings
  5. Set Java Max Heap Size to 1G (or larger if needed)

The project now builds.

tretom

Having the same problem, for me the following worked (well it's a specific situation causing this error - might be not the only one):

Set Build Log verbosity to Detailed: in VS2017 -> Tools -> Options -> Projects and Solutions -> Build and Run ->MSBuild project build output verbosity -> Detailed (minimum)

Start a build. In output log (eg. in output window) search for

proguard.ParseException:

if the log contains something like:

proguard.ParseException: Unknown option '´╗┐-keep' in line 1 of file 'proguard.cfg'

then simply open your file in a text editor and save it without BOM.

eg. in Notepad++ Encoding -> Encode in UTF8 (make sure not to select Encode in UTF8-BOM) ...and save

Rebuild your project/solution. It should work - at least it workd for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!