How to manually install App Engine in Android Studio?

前端 未结 3 516
迷失自我
迷失自我 2020-12-07 02:16

I just added the App Engine module to my app and upon syncing, gradle started downloading the App Engine zip from maven. App Engine\'s zip file is about 150mb+ and using mav

3条回答
  •  日久生厌
    2020-12-07 02:42

    A completely different approach would be be to create a local maven repository for the appengine sdk and reference that directly and leave everything else intact.

    repositories {
      maven {
        url 'file://path/to/myCustomRepo'
      }
      mavenCentral()
    }
    

    So this method is easiest if you grab the appengine sdk directly from maven.org because it will be named correctly. (http://search.maven.org/#artifactdetails|com.google.appengine|appengine-java-sdk|1.9.6|zip) but chose the version you are referencing in your build file.

    About the maven repo, you need to set it up correctly. If your downloaded zip is in /path/to/myCustomRepo you need to actually put the zip in the correct location : /path/to/myCustomRepo/com/google/appengine/appengine-java-sdk/1.9.6 depending on the version number you're using.

    If you only have the zip file in the repository directory you need to modify the downloadSdk line to indicate all that is available is the "zip" with the @zip modifier.

    downloadSdk "com.google.appengine:appengine-java-sdk:1.9.6@zip"
    

    If you don't want to use the @zip you can add a simple .pom file (next to the .zip) so the system can correctly determine the reference

    appengine-java-sdk-1.9.6.pom

    
    
      4.0.0
      com.google.appengine
      appengine-java-sdk
      zip
      1.9.6
    
    

提交回复
热议问题