maven android plugin:No Android SDK path could be found

后端 未结 4 713
臣服心动
臣服心动 2021-02-08 05:58

I use the maven-android-plugin version 3.3.2. When I try to build my android project I have the following exception:

org.apache.maven.p

4条回答
  •  有刺的猬
    2021-02-08 06:05

    It sounds like, while the env var is available on the shell you run, it isn't available on the shell Maven runs.

    Regardless, instead of working around it, it's best to create a settings file with the property set. A minimal one would look like this (writing off the top of my head, as I don't have my settings file available now) :

    
      
        
            android-settings
            
                /path/to/android/sdk
            
        
      
      
            android-settings
      
    
    

    Throw it into your .m2 folder or set it via Eclipse in Window->Preferences...->Maven->User Settings.

提交回复
热议问题