Maven (mvn) build error

113 views
Skip to first unread message

Helmut Obermeier

unread,
Nov 12, 2021, 5:45:52 PM11/12/21
to zxing
Hi folks,

mvn package android:apk from
---
$ mvn package android:apk
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for com.google.android:android:jar is
missing. @ line 34, column 17
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.google.zxing:android:4.7.9 (C:\Users\Helmut\AndroidStu
dioProjects\zxing\android\pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for com.google.android:android:jar
 is missing. @ line 34, column 17
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
gException
---
This is true for Windows (zxing-zxing-3.4.1.zip) and Linux/cygwin (zxing-zxing-3.4.1.tar.gz) packages and "git clone https://github.com/zxing/zxing/" (Version 3.4.2-SNAPSHOT).

Yours sincerely
Helmut Obermeier

Sean Owen

unread,
Nov 12, 2021, 6:35:44 PM11/12/21
to Helmut Obermeier, zxing
You didn't activate the Android profile in the build - it will activate if ANDROID_HOME is set

--
You received this message because you are subscribed to the Google Groups "zxing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zxing/69226ed9-2253-4159-b791-63ec427561acn%40googlegroups.com.

Helmut Obermeier

unread,
Nov 12, 2021, 6:46:28 PM11/12/21
to zxing
"set" prints the following environment variable in Linux/cygwin:
[...]
ANDROID_HOME='C:\Users\Helmut\AppData\Local\Android\Sdk'
[...]
In Windows:
[...]
ANDROID_HOME=C:\Users\Helmut\AppData\Local\Android\Sdk
[...]
"mvn install" works fine...

Sean Owen

unread,
Nov 12, 2021, 8:16:55 PM11/12/21
to Helmut Obermeier, zxing
Hm, OK, are you running from the android/ dir? this works for me.

Helmut Obermeier

unread,
Nov 13, 2021, 1:05:02 PM11/13/21
to zxing
Yes I call "mvn package android:apk" while in work dir android/ just as in the getting started doc.

Sean Owen

unread,
Nov 13, 2021, 1:06:19 PM11/13/21
to Helmut Obermeier, zxing
Are you building from master or another tag? Still works ok for me but I'm on Linux.

Helmut Obermeier

unread,
Nov 13, 2021, 1:46:58 PM11/13/21
to zxing
I do not command another tag so it should be master.
Reply all
Reply to author
Forward
0 new messages