Unity Android shows the problem of two apps after installing apk

Introduction:

    A few days ago, when I used Unity to print the Android package, I installed it on the phone, and there were two references with the same icon. After clicking on them, the applications started were inconsistent.

the reason:

    Some SDKs are connected to the project. There is an Application in the AndroidManifest file of the SDK, and an Activity that is set to start by default, and the AndroidManifest file in the project also has its own Application and an Activity that is started by default.

solution:

    The Application in the project inherits the Application in the SDK, and the activity started by default also inherits the Activity in the SDK. No matter how many SDKs are in the project, keep the Application and Activity in the project unique, otherwise Unity will consider it as two applications when packaging. It is recommended that the project use a custom default startup Activity and inherit the Activity from other SDKs to facilitate expansion.

 

    When integrating other SDKs, you may need to modify the files in the aar on the Android side, especially the AndroidManifest files, such as permission modification, Activity conflict, Application conflict, etc. If you use someone else’s SDK, there may be no source code and you can’t re-play aar, so what? Can the files in aar be modified? Look quickly modify aar file

Guess you like

Origin blog.csdn.net/mango9126/article/details/107721796