env.ANDROID_HOME compile error with spring boot
See original GitHub issuecompile error with javase version
I just want to use zxing on my web server to work with spring boot. but this library seens force me to install android development.
build.gradle
compile group: 'com.google.zxing', name: 'javase', version: '3.3.1'
error log
> Task :model:compileJava
Errors occurred while build effective model from /Users/kingyang/.gradle/caches/modules-2/files-2.1/com.google.zxing/javase/3.3.1/357121cdf3f89f63ddfaad18170612dcad0db947/javase-3.3.1.pom:
'dependencyManagement.dependencies.dependency.systemPath' for com.google.android:android:jar must specify an absolute path but is ${env.ANDROID_HOME}/platforms/android-22/android.jar in com.google.zxing:javase:3.3.1
Errors occurred while build effective model from /Users/kingyang/.gradle/caches/modules-2/files-2.1/com.google.zxing/core/3.3.1/d1e7c4667f9dcdda30d09f3df7d1b44f65c44336/core-3.3.1.pom:
'dependencyManagement.dependencies.dependency.systemPath' for com.google.android:android:jar must specify an absolute path but is ${env.ANDROID_HOME}/platforms/android-22/android.jar in com.google.zxing:core:3.3.1
> Task :compileJava
Errors occurred while build effective model from /Users/kingyang/.gradle/caches/modules-2/files-2.1/com.google.zxing/javase/3.3.1/357121cdf3f89f63ddfaad18170612dcad0db947/javase-3.3.1.pom:
'dependencyManagement.dependencies.dependency.systemPath' for com.google.android:android:jar must specify an absolute path but is ${env.ANDROID_HOME}/platforms/android-22/android.jar in com.google.zxing:javase:3.3.1
Errors occurred while build effective model from /Users/kingyang/.gradle/caches/modules-2/files-2.1/com.google.zxing/core/3.3.1/d1e7c4667f9dcdda30d09f3df7d1b44f65c44336/core-3.3.1.pom:
'dependencyManagement.dependencies.dependency.systemPath' for com.google.android:android:jar must specify an absolute path but is ${env.ANDROID_HOME}/platforms/android-22/android.jar in com.google.zxing:core:3.3.1
注: /Users/kingyang/dev/java/lipu/api/src/main/java/com/lipuwater/service/PushService.java
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
android - Failed to find 'ANDROID_HOME' environment variable
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory. You may not have...
Read more >windows上gradle的springboot里zxing报错android:jar must ...
Gradle build breakage with 3.3.1 release - ${env.ANDROID_HOME} · env.ANDROID_HOME compile error with spring boot.
Read more >windows上gradle的springboot里zxing报错 ... - CodeAntenna
env.ANDROID_HOME compile error with spring boot. 版权声明:本文为CSDN博主「c5113620」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
Read more >How to obtain Spring library to set up Spring environment?
How to configure Spring Boot 1.2.0 for Servlet 3.0 and have m2e set Eclipse Facet to 3.0? How do I set environment variables...
Read more >Spring Tips: Configuration
This mechanism - configuring Spring Boot with environment variables or program arguments - is a general-purpose. You can use it for any ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve got same issue, and solved by following steps, hope this helps.
ENV: windows 10 Intellij IDEA (only java) gradle, springboot, zxing3.3.2
I’ve solved the problem like qianggetaba said, except that I’ve replaced the systempath with the absolute path of the android.jar file from Android SDK. If you go to the file that qianggetaba specified and look for the systemPath tag, you’ll see a comment there that says: “ANDROID_HOME must be absolute, but redundant leading / may help Gradle Spring Boot plugin”. So I’ve replaced the old path, that in my case used {env.ANDROID_HOME}, with:
Then the error disappeared.