005 Settings can be installed and debugged directly through AndroidStudio (2)——Problems encountered in the release package of Settings

1. Background

Migrating Settings to AndroidStudio and directly printing the release package has various problems, and the package cannot be produced. Here we will describe the problems and solutions of the Settings package in detail.

二.Type com.android.settingslib.widget.BuildConfig is defined multiple times

The first stumbling block encountered is also the most cumbersome package name conflict. I said before that this problem will occur in the new version of AndroidStudio, but this problem still exists in the release package here, and I have to face it head-on.

Solution: Create a new package named com.android.settingslib.widget and put all the module content (mainly res files and src files and gradle dependent content) into this new package named com.android.settingslib.widget  In the module, you need to put all the package name com.android.settingslib.widget module content in the new module, as follows:

Supongo que te gusta

Origin blog.csdn.net/gongjdde/article/details/131329603
Recomendado
Clasificación