Android, Maven and Deploying
When you build and deploy to device your Android app sometimes you just want to ,,upgrade'' instead of reinstall (because of databases, saved preferences etc.). You could achive this in two simple steps:
-
Add to your pom.xml ,,maven-compiler-plugin'':
<plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <version>3.4.0</version> <configuration> ... <aaptExtraArgs> <aaptExtraArg>-u</aaptExtraArg> </aaptExtraArgs> </configuration> ... </plugin>
Run: mvn clean install android:deploy Now your app should be upgraded everytime you deploy instead of remove-install.
Written by Lukas Redynk
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Android
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#