Scala plugin -android

I'm having problems running the scala -android plugin when starting sbt from IntelliJ. When I run sbt for the same project from a Mac terminal, I get no errors:

~/Documents/my-android-project $ sbt [info] Loading global plugins from /Users/rgoodwin/.sbt/plugins [info] Loading project definition from /Users/rgoodwin/Documents/my-android-project/project [info] Set current project to (in build file:/Users/rgoodwin/Documents/my-android-project/) 

But when I try to run sbt from IntelliJ, I get:

 [info] Loading global plugins from /Users/rgoodwin/.sbt/plugins [info] Loading project definition from /Users/rgoodwin/Documents/my-android-project/project [error] Android SDK not found. You might need to set ANDROID_SDK_HOME or ANDROID_SDK_ROOT or ANDROID_HOME [error] Use 'last' for the full log. Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

Why can't I find the Path names that I set inside IntelliJ?

+4
source share
1 answer

I think you probably set ANDROID_SDK_HOME to your .bashrc so that this property is set when sbt starts.

When you start Intellij, you do not start it from the command line, therefore ANDROID_SDK_HOME not detected when you run sbt from Intellij.

For MacOS, I think you can set global environment variables (see http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html ).

+4
source

Source: https://habr.com/ru/post/1382160/


All Articles