question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BT:0.9.0] Error: File '' is a directory. java.lang.IllegalArgumentException: File '' is a directory

See original GitHub issue

Describe the bug I try do build-apks from android app bundle but I get an error. I have already try to use 2 versions: 0.3.3 and 0.9.0 but these libs don’t work. I had to use sudo for making sure these libs have full access/permission to run the command line. I had to create 2 folders which have the name output.apks and output. But nothing work

sudo java -jar bundletool-all-0.9.0.jar build-apks --bundle=app.aab --output=output.apks --ks --ks-key-alias

Bundletool version(s) affected Version: 0.3.3 & 0.9.0

Stacktrace

[BT:0.9.0] Error: File '' is a directory.
java.lang.IllegalArgumentException: File '' is a directory.
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:204)
	at com.android.tools.build.bundletool.model.utils.files.FilePreconditions.checkFileExistsAndReadable(FilePreconditions.java:36)
	at com.android.tools.build.bundletool.model.SigningConfiguration.extractFromKeystore(SigningConfiguration.java:86)
	at com.android.tools.build.bundletool.commands.BuildApksCommand.fromFlags(BuildApksCommand.java:414)
	at com.android.tools.build.bundletool.commands.BuildApksCommand.fromFlags(BuildApksCommand.java:374)
	at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:74)
	at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:46)

To Reproduce

  1. Download libs: 0.9.0 or 0.3.3
  2. Run sudo java -jar bundletool-all-0.9.0.jar build-apks --bundle=app.aab --output=output.apks --ks --ks-key-alias

Expected behavior Generate APKs

Known workaround If you have found a workaround, please specify what it is.

Environment: OS: MacOS 10.14.2 Beta (18C52a)

Additional context My Folder My Command Line

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
plecesnecommented, Jun 4, 2019

It looks like you haven’t provided any value to the flags --ks and --ks-key-alias.

0reactions
plecesnecommented, Jun 4, 2019

As the error message mentions, the output file already exists. Delete it, or add the flag --overwrite to the command if you want to overwrite it.

You can find the list of flags in the help:

bundletool help build-apks
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cucumber : java.lang.IllegalArgumentException: Not a file or ...
I was using 1.1.2 version jar for cucumber-java,cucumber-junit ... This error clearly says that "Not a file or directory" which means the path...
Read more >
cucumber java.lang.IllegalArgumentException: Not a file or ...
When I run the test in a runner class test runs but when I tried running the test from the feature file I...
Read more >
java.lang.IllegalArgumentException: Parameter 'directory' is ...
We are trying to load TSV file to druid cluster setup with Ambari. Before doing so we did the same on a single...
Read more >
Health check failed due to java.lang.IllegalArgumentException
IllegalArgumentException : Host name may not contain blanks ... After looking at the JAVA input arguments in the setenv.sh file, ...
Read more >
536880 – java.lang.IllegalArgumentException: Path must ...
Hi, when doing a git pull i am getting this error message: An ... This event should contain only files (git doesn't do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found