How to build API client library using Gradle for my android app

可紊 提交于 2019-12-11 07:17:24

问题


I just generated my Endpoint API client library Bundle, and according to the instructions on its README file, this is what it says:

This is a client library bundle using Google Cloud Endpoints. In order to use this API client library in your project, you need to build the library using Gradle.

How to build API client library using Gradle

Under the root directory of the client bundle, run "gradle install" in the command console. By running this command, this API client bundle would be build by Gradle, and be deployed to local Maven repository. (Gradle doesn't have native repository system, but could leverage repository systems like maven repository.)

I tried building the library on my windows command prompt using the "gradle install" command.. but it's saying "gradle" is not recognised..

My API Client Bundle Directory(C:\Users\Toshiba\Documents\ANDROID\core-v5\core) contains these files and folder:

  1. src (a folder)
  2. build.gradle
  3. LICENSE.txt
  4. proguard-google-api-client.txt
  5. readme.html

How do I build the client library using Gradle ?


回答1:


I finally figured it out...

First, you have to install Gradle by following this link

Then secondly, you open your command prompt and change directory to the root directory of where the build.gradle is located in your unziped client bundle.

And thirdly, you run this command "gradle install"..




回答2:


Are you using Android Studio to creating the application ? If yes then go through the document, to have some insight on how to use gradle.



来源:https://stackoverflow.com/questions/29307553/how-to-build-api-client-library-using-gradle-for-my-android-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!