问题
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:
- src (a folder)
- build.gradle
- LICENSE.txt
- proguard-google-api-client.txt
- 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