Maven needed when generating Google App Engine backend in Android Studio

后端 未结 5 910
青春惊慌失措
青春惊慌失措 2021-01-25 21:23

AndroidDev

So I\'m trying to add a Google App Engine backend to my app. I\'m using Android Studio 0.3.0. When I try to "Generate App Engine Backend" I get t

相关标签:
5条回答
  • 2021-01-25 21:33

    I found a solution. You have to set the enviroment variable M2_HOME to the path to your maven installation. For me that was "C:\Program Files (x86)\Android\apache-maven-3.1.1". I have maven seperatly from AS but I think this would also work if you point M2_HOME towards the AS installation of maven. Additionally you can try to add the bin folder of you maven installation to the Path enviroment variable. In my case that was "C:\Program Files (x86)\Android\apache-maven-3.1.1\bin".

    There seems to be a bug in the newest version of AS. You have to explicitly set the path with the enviroment variables otherwise it will not work. Setting the path in Settings -> Maven (after checking override) does not work. Here's the link to the issue: https://code.google.com/p/android/issues/detail?id=61783

    0 讨论(0)
  • 2021-01-25 21:45

    I am currently on Studio 0.4.2

    After lots of Googling I was still unable to resolve this. I have tried all suggested solutions the best answer I found was this

    This is posted Jan 15 2014

    "Yes, sorry this is a bug, however we're moving to a Gradle based build so in the future Maven wont be the build system that App Engine templates are realized (sic) with."

    Google Issues for Android Studio


    update on Mar 26th 2014 This has been moved to Gradle from Maven

    0 讨论(0)
  • 2021-01-25 21:51

    maven is not shipped with AS - you have to install it

    0 讨论(0)
  • 2021-01-25 21:52

    Linux Solution

    You have to install maven & Google Cloud messaging for Android.

    From terminal:

    sudo apt-get install maven
    

    Then inside Android Studio:

    1. Tools > Android > SDK Manager
    2. Scroll down to Extras
    3. Check Google Cloud Messaging for Android
    4. Install
    0 讨论(0)
  • 2021-01-25 21:57

    Dec 26 2013 Maven 3.1.1 does not successfully complete the code generation, switch to Maven 3.0.5 for success ! This is for Android Studio 0.3.2 make sure you edit your PATH information as explained in Maven install.

    0 讨论(0)
提交回复
热议问题