Source of demand

The product manager felt that it was too troublesome to uninstall and switch between the beta version and the official version. Ask if you can install both the beta and official versions of the app on the same phone. As a technical pursuit of the programmer, how can say no!

hands-on

  1. Make a big move. Google it first. Gradle allows you to configure different versions of applications with different ApplicationIDS, which are basically applications of the applicationIdSuffix attribute. The diagram below:Source of ideas
  2. Encountered problems full of joy, directly according to the article to provide ideas to do. After adding it, the project failed to compile. AAPT2 error: check logs for details For fun, it seems that after the AS is upgraded to 3.0 or higher, the error location is not so smart. As a rule of thumb, most of the errors reported are files in the RES package. Terminal in the direct execution gradlew compileDebugSources – stacktrace – info is clear to see an error from the style. The XML, another colleague with original custom attributes added package name, to replace the name.
  3. For eagle-eye students, you may have seen that Gradle has configured the Manifestplaceholder to distinguish between the aurora push test application and the official application that displays error information.

Postscript: don’t hurry up and apply it to the project, save the test sister time, more time to enhance each other’s feelings!

Ps: Here, shamelessly recommend their own public account, the main share of the public account is my stock market (investment), the property market, life, etc., technology to share secondary (I am a technology meng new) I hope to help you.