Introduction
This showcase includes an Android client and a Spring MVC server. Together these illustrate the interaction of the client and server when using Spring for Android. This Android project requires set up of the Android SDK. See the main README at the root of this repository for more information about configuring your environment.
Build and Run the Server
- Navigate to the server directory:
$ cd spring-android-showcase/server
- Build and run the app:
$ ./gradlew build bootRun
Build and Run the App
- Navigate to the client directory:
$ cd client
- Start the emulator using the Android Maven Plugin:
$ mvn android:emulator-start
Alternatively, you can start the emulator using the Android command line tools:$ Có thể tạo avd trên android studio rồi chạy client này.
Important: Ensure the emulator is fully initialized and ready or the deploy will fail. - Build the app:
$ mvn clean package
- Deploy and run the app:
$ mvn android:deploy android:run
Note: the Android Maven Plugin will attempt to deploy the app to all available devices, both emulators and physical devices attached to your computer.
Nguồn: spring-android-showcase
0 comments:
Post a Comment