1

Inspired by this answer, I'm using:

java -jar %BUILDTOOLSPATH%\jill.jar --output classes.jayce src

java -jar %BUILDTOOLSPATH%\jack.jar --import classes.jayce --output-dex .

to build an Android app, on Windows.

I get:

Failed to load file 'classes.jayce', entry '/dom\domain\main.jayce': Wrong type in 'file 'classes.jayce', entry '/dom\domain\main.jayce'', found 'Ldom/domain/main;' while expecting 'Ldom\domain\main;'

This seems to be a \ or / Windows problem. How to solve this?

Note: Here is the full source code. My goal is to have a ready to use Android "Hello World" app, compilable from command-line without using an IDE (such as Android Studio) at all.

Basj
  • 41,386
  • 99
  • 383
  • 673

1 Answers1

0

Seems like you're stuck with the folder browsing structure. Its different for Linux/Unix based systems and Windows. Windows use backward slash to separate directories in file path, where as linux uses forward slash for the same.

Referring this link

In Windows, backslashes are used to separate directories in file paths (ex: C:\Program Files\Common Files\microsoft shared). On Mac and Unix systems, forward slashes are used for the same purpose (ex: /System/Library/Screen Savers).

The guide you referred is Linux/Unix based. So the solution to your question is that wherever you find some file getting accessed by file path, simply replace the forward slash with backward slash and that should solve this problem.

cyberrspiritt
  • 908
  • 8
  • 26
  • Sure it's this well known problem, but the question is how to solve it here? I don't see anything wrong in the BAT or manifest file here https://github.com/josephernest/helloworldandroidapp_withoutIDE but still this errors happens. – Basj Nov 11 '17 at 11:17