Barry Fruitman
Barry Fruitman

Reputation: 12656

Proguard returned with error code 1. (The filename, directory name, or volume label syntax is incorrect)

I just upgraded to the latest ADT (19) and I'm getting complaints again from ProGuard but this time it's worse than usual. I've read dozens of questions about this error but none of the answers work this time.

When I try to export a signed APK, the console says:

Proguard returned with error code 1. See console

Error: @C:\Users\Barry\AppData\Local\Temp\android_8523956309172274256.pro (The filename, directory name, or volume label syntax is incorrect)

I confirmed that file exists (I read elsewhere the @ is part of the error message, not part of the filename). I think this error is complaining about file path, not the file contents, but just in case I've included the contents below.

EDIT: I confirmed in the ProGuard docs that the @ is supposed to be there. It is part of the command-line syntax.

In the past I fixed ProGuard errors after upgrading the ADT by changing the "%@" parameter in proguard.bat as this thread recommends. The error above is entirely new to me. I found only one other report in this thread but the poster fixed it by upgrading to ProGuard 4.8. No such luck for me. :(

Thank in advance...

EDIT: When I ran ProGuard manually with the above input jars, it reported missing classes due to missing jars (although I never saw this in the console). The problem is I still don't know why ProGuard or ADT is generating .pro files with missing jars since they are on my build path and worked with the previous ADT.

Contents of the file above:

C:\Users\Barry\dev\workspace\MY-PROJECT\proguard.cfg

-injars C:\Users\Barry\AppData\Local\Temp\android_824795077905177388.jar;C:\Users\Barry\dev\workspace\KeyboardLib\bin\keyboardlib.jar;C:\Users\Barry\dev\android-sdk\tools\support\annotations.jar

-outjars C:\Users\Barry\AppData\Local\Temp\android_2943979964980515538.jar

-libraryjars C:\Users\Barry\dev\android-sdk\platforms\android-10\android.jar

-dump C:\Users\Barry\dev\workspace\MY-PROJECT\proguard\dump.txt

-printseeds C:\Users\Barry\dev\workspace\MY-PROJECT\proguard\seeds.txt

-printusage C:\Users\Barry\dev\workspace\MY-PROJECT\proguard\usage.txt

-printmapping C:\Users\Barry\dev\workspace\MY-PROJECT\proguard\mapping.txt

All the jar files above exist and contains .class files, except for the outjar file, which exists but is 0 bytes.

Upvotes: 1

Views: 2091

Answers (3)

Vaiden
Vaiden

Reputation: 16122

Windows 7, Eclipse Juno, using ADT 22.2.1.

The original Proguard was 4.6. I had to upgrade to 4.10 to solve this problem.

Upvotes: 0

Pete
Pete

Reputation: 3872

I had the exact same issue as you. What ended up working for me was upgrading the version of proguard packaged with the android SDK to 4.8. For some reason proguard 4.7 was the source of the issues.

Replace the contents of the \android-sdk\tools\proguard\lib\ and \android-sdk\tools\proguard\bin\ folder with the files downloaded from the proguard site.

I'm using ADT 20.0.3

Upvotes: 2

Barry Fruitman
Barry Fruitman

Reputation: 12656

Ok I solved it for myself. Unfortunately the solution was rolling back to ADT 18 and ProGuard 4.7. Strangely, even ProGuard 4.8 gave the same error with ADT 18. I'm pretty sure it's a bug in ADT. Perhaps it's incompatible with the ADT Eclipse plug-in which is still at version 18. It's strange that ADT 19 is available via the SDK manager even though the SDK download is still bundled with ADT 18.

My advice is to backup everything before upgrading anything from Google as we are all their beta testers.

Upvotes: 0

Related Questions