Method, System and Electronic Device for Packaging Android Project in Unity Multiple Projects to Generate AAR
By configuring attribute tags in the information description file of Unity multi-projects and processing duplicate files in the main project, the problem of conflicts between so package duplication and style themes in the Unity multi-project package AAR is solved, and the normal operation and style consistency of the project is achieved.
Patent Information
- Application Number
- CN202111595199.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2041-12-24
AI Technical Summary
When Unity multi-project packages AAR, multiple so packages unzipped by the aar package are repeated, and style theme conflicts between multiple projects. The existing technology has failed to effectively solve these problems.
By configuring attribute tags in the information description files of each project, keep the style and theme consistent, and distinguish the unity scenarios corresponding to different projects. Then, unzip the aar package and remove the duplicate jar package and so package, put them into the main project respectively, and add ndk support to the tool building file of the main project to run the Android project.
It solves the problem of style theme conflict between multiple so packages unzipped by the aar package and multiple projects, avoids errors caused by inconsistencies in duplicate files and topics, and ensures the normal operation of the project and the consistency of styles.
Smart Images

Figure CN114327402B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software R & D, and particularly relates to a method, a system and an electronic device for generating an aar for an Android project by packaging multiple Unity projects. Background Art
[0002] Unity, as a game engine and development tool, is a real-time 3D interactive content creation and operation platform, and can package an aar (Android Archive) through a single Unity project. Among them, the aar package is a binary archive file of an Android library project.
[0003] Currently, in the related technologies, there is only a method for packaging an aar through a single Unity project. The specific steps are to use a plugin in the single project, specify the Android project as the application, and add attributes in the tag, and then package the aar. If the method of packaging an aar based on a single Unity project is used for packaging multiple Unity projects, problems such as duplicate so packages extracted from the aar package in multiple Unity projects and style theme conflicts between multiple projects will occur.
[0004] Regarding the problems of duplicate so packages extracted from the aar package and style theme conflicts between multiple projects in the packaging of multiple Unity projects into an aar, no effective solution has been proposed yet. Summary of the Invention
[0005] The main purpose of the present invention is to provide a method and a system for generating an aar for an Android project by packaging multiple Unity projects, so as to solve the problems of duplicate so packages extracted from the aar package and style theme conflicts between multiple projects in the packaging of multiple Unity projects into an aar.
[0006] To achieve the above purpose, the first aspect of the present invention provides a method for generating an aar for an Android project by packaging multiple Unity projects, including:
[0007] Using Unity to generate Android projects of multiple projects, each project corresponding to a scene;
[0008] Configuring property tags in the information description files of each project;
[0009] After configuring the property tags, building a packaging task in the multiple Unity projects to generate a release version of the aar package;
[0010] Unpacking the aar package and removing the jar packages and so packages in the unpacked files;
[0011] Putting the removed jar packages and so packages into the main project respectively;
[0012] Add ndk support to the tool build file corresponding to the main project and run the Android project.
[0013] Optionally, in the information description file of each project, the configuration attribute tag includes:
[0014] In the application declaration tag of each project's information description file, configure the first attribute tag that is consistent with the icon and theme of the main project;
[0015] For the metadata tags in the information description file of each project, configure the second attribute tag in the metadata tag whose name attribute is unity scene, and add the unity package aar identity token to distinguish each scene.
[0016] Optionally, the packaging task is built in the multi-project of Unity to generate a release version of the aar package, including:
[0017] Pack in Unity's multi-project to generate a debug version of the aar package;
[0018] After the debugging version of the aar package is debugged successfully, the release version of the aar package is obtained.
[0019] Optionally, decompress the aar package and remove the jar package and so package from the decompressed file, including:
[0020] Unzip each aar package and analyze the unzipped files;
[0021] Remove the duplicate unity-classes.jar and so packages from the decompressed files.
[0022] Optionally, the step of putting the removed jar packages and so packages into the main project respectively includes:
[0023] Put the removed jar package into the libs folder of the main project;
[0024] Put the armeabi-v7a folder containing the removed so package into the jniLibs folder created in advance in the main project, where the jniLibs folder is at the same level as the java folder in the main project.
[0025] Optionally, adding ndk support in the tool build file corresponding to the main project and running the Android project includes:
[0026] Determine the main project based on the scenario corresponding to the current project;
[0027] Add NDK support to the tool build file corresponding to the main project and configure the CPU type of the Android device to armeabi-v7a;
[0028] After the configuration is complete, run the Android project.
[0029] Further, the running of the Android project includes:
[0030] Put the aar packages with multiple unity into the Android project and run the Android project.
[0031] The second aspect of the present invention provides a system for generating an aar for an Android project by packaging multiple unity projects, including:
[0032] A generation unit for generating an Android project with multiple projects using unity, where each project corresponds to a scene;
[0033] A configuration unit for configuring property tags in the information description files of each project;
[0034] A packaging unit for building a packaging task in the multiple projects of unity after configuring the property tags to generate a release version of the aar package;
[0035] A removal unit for decompressing the aar package and removing the jar packages and so packages in the decompressed files;
[0036] A placement unit for respectively placing the removed jar packages and so packages into the main project;
[0037] An addition unit for adding NDK support to the tool build file corresponding to the main project and running the Android project.
[0038] The third aspect of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the method for generating an aar for an Android project by packaging multiple unity projects provided in any item of the first aspect.
[0039] The fourth aspect of the present invention provides an electronic device, where the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to cause the at least one processor to execute the method for generating an aar for an Android project by packaging multiple unity projects provided in any item of the first aspect.
[0040] In the method for generating an aar for an Android project by packaging multiple Unity projects provided in the embodiments of the present invention, a Unity-generated Android project with multiple projects is used, and each project corresponds to a scene; in the information description files of each project, property tags are configured; after configuring the property tags, a packaging task is constructed in the multiple Unity projects to generate a release version of the aar package; the aar package is decompressed, and the jar packages and so packages in the decompressed files are removed; the removed jar packages and so packages are respectively placed into the main project; ndk support is added to the tool build file corresponding to the main project, and the Android project is run. By configuring property tags in the information description files of each project, the present invention keeps the style theme consistent and distinguishes the Unity scenes corresponding to different projects. By removing the jar packages and so packages in the decompressed files and respectively placing the removed jar packages and so packages into the main project, conflicts and error reporting are avoided, solving the problems of duplicate so packages extracted from the aar package and style theme conflicts between multiple projects in the packaging of aar by Unity projects. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0042] Figure 1 It is a schematic flowchart of the method provided by the embodiments of the present invention;
[0043] Figure 2 It is a schematic diagram of configuring the first property tag provided by the embodiments of the present invention;
[0044] Figure 3 It is a schematic diagram of configuring the second property tag provided by the embodiments of the present invention
[0045] Figure 4 It is a schematic diagram of packaging aar provided by the embodiments of the present invention;
[0046] Figure 5 It is a schematic diagram of generating debug and release versions of the aar package provided by the embodiments of the present invention;
[0047] Figure 6 It is the jar package in the libs file under scene 1 in the aar package of each Unity project provided by the embodiments of the present invention;
[0048] Figure 7The jar packages in the libs file under scenario 2 in each engineering aar package of Unity provided by the embodiments of the present invention;
[0049] Figure 8 The so package under scenario 1 provided by the embodiments of the present invention;
[0050] Figure 9 The so package under scenario 2 provided by the embodiments of the present invention;
[0051] Figure 10 The schematic diagram of separately putting the excluded jar packages and so packages into the main project provided by the embodiments of the present invention;
[0052] Figure 11 The schematic diagram of adding NDK support in the tool construction file corresponding to the main project provided by the embodiments of the present invention;
[0053] Figure 12 The system block diagram provided by the embodiments of the present invention;
[0054] Figure 13 The block diagram of the electronic device provided by the embodiments of the present invention. Detailed implementation manners
[0055] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above accompanying drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so as to describe the embodiments of the present invention here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0057] In the present invention, terms such as "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. These terms are mainly used to better describe the present invention and its embodiments, and are not used to limit that the indicated system, element or component must have a specific orientation, or be constructed and operated in a specific orientation.
[0058] Moreover, in addition to being able to represent the orientation or positional relationship, some of the above terms may also be used to represent other meanings. For example, the term "upper" may also be used to represent a certain attachment relationship or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in the present invention can be understood according to specific circumstances.
[0059] In addition, terms such as "install", "set", "provided with", "connect", "connected", "socketed" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or there is an internal connection between two systems, elements or components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0060] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the drawings and in conjunction with the embodiments.
[0061] Currently, in the related art, there is only a method for packaging an aar in a unity single project. The specific steps are to use a plugin in the single project, specify the Android project as the application, and add attributes in the tag, and then package the aar; if the method of packaging an aar based on a unity single project is used for packaging multiple unity projects, it will cause problems such as duplicate so packages extracted from the aar packages in multiple unity projects and style theme conflicts between multiple projects.
[0062] To solve the above problems, an embodiment of the present invention provides a method for packaging an Android project in multiple unity projects to generate an aar. As Figure 1 shown, the method includes the following steps S101 to S106:
[0063] Step S101: Use unity to generate Android projects for multiple projects, with each project corresponding to a scene; multiple projects correspond to multiple scenes. The scenes can be the Forbidden City, the Great Wall, the square, etc. Each project (library) or each module corresponds to a scene;
[0064] Step S102: Configure property tags in the information description files of each project;
[0065] Specifically, step S102 includes:
[0066] In the application declaration tag of the information description file of each project, configure the first property tag that is consistent with the icon and theme of the main project;
[0067] The schematic diagram of configuring the first property tag is as Figure 2 shown. Among them, in the application tag (application declaration tag) of the AndroidManifest.xml file (information description file) of each library, add the following tag:
[0068] tools:replace = "android:icon,android:theme"
[0069] Its main purpose is to introduce the first property tag that is consistent with the icon and theme of the main project, maintain the same style, prevent theme conflicts, and avoid errors caused by inconsistent icons or themes between projects.
[0070] For the metadata tags in the information description files of each project, configure the second property tag in the metadata tag whose name attribute is the unity scene, and add the unity packaging aar identity token to distinguish each scene.
[0071] The schematic diagram of configuring the second property tag is as Figure 3 shown. Among them, in the AndroidManifest.xml file of each library, configure the second property tag under the meta-data tag (metadata tag) whose name attribute (name attribute) is unity.build-id (unity scene):
[0072] tools:replace = ”android:value”
[0073] Its main purpose is to add the identity token of the unity packaging aar, distinguish the unity scenes corresponding to each project, and avoid errors when multiple aar files containing unity are introduced into the Android project during packaging.
[0074] After configuring the property tags in step S103, build a packaging task in the multi-project of unity to generate a release aar package;
[0075] The schematic diagram of packaging the aar is as Figure 4As shown, click on gradle in the right column, find Tasks->build->assemble in the multi-project library of unity, and then click assemble (package), which represents generating an aar package.
[0076] Specifically, step S103 includes:
[0077] Perform packaging in the multi-project of unity to generate a debug version of the aar package;
[0078] After the debug version of the aar package passes the debugging, obtain the release version of the aar package.
[0079] As Figure 5 shown, after packaging, generate the unityLibrary-debug.aar file (debug version of the aar package). After the unityLibrary-debug.aar file passes the debugging, generate the unityLibrary-release.aar file (release version of the aar package).
[0080] Step S104: Unzip the aar package and remove the jar packages and so packages in the unzipped files.
[0081] Specifically, step S104 includes:
[0082] Unzip each aar package and analyze the unzipped files;
[0083] Remove the duplicate unity-classes.jar and so packages in the unzipped files.
[0084] Among them, the aar package is essentially a compressed package. You can first unzip each compressed package. As Figures 6 to 9 shown, among them, Figure 6 is the jar package in the libs file under scenario 1 of the aar packages of each unity project, Figure 7 is the jar package in the libs file under scenario 2 of the aar packages of each unity project, Figure 8 is the so package under scenario 1, Figure 9 is the so package under scenario 2; By comparing and analyzing Figure 6 and Figure 7 , comparing and analyzing Figure 8 and Figure 9 , it can be seen that the unity-classes.jar and so packages inside are all the same. To avoid errors due to duplication, remove them all.
[0085] Step S105: Put the removed jar packages and so packages into the main project respectively;
[0086] Specifically, step S105 includes:
[0087] Put the excluded jar packages into the libs folder of the main project.
[0088] Put the armeabi-v7a folder containing the excluded so packages into the jniLibs folder pre-created in the main project, where the jniLibs folder is at the same level as the java folder in the main project.
[0089] In the above Figures 6 to 9 Select one non-duplicate copy from the excluded multiple duplicate jar packages and so packages and put them into the main project respectively, that is, select the most non-duplicate jar packages and the most non-duplicate so packages from the excluded jar packages and so packages and put them into the main project respectively. The specific placement method is as Figure 10 shown: Among them, put the jar package unity-classes.jar into the libs folder, and put the armeabi-v7a folder containing the so package into the jniLibs folder. The pre-created jniLibs folder is under the main folder in the main project and is at the same level as the java folder in the main project.
[0090] By selecting one non-duplicate copy from the excluded multiple duplicate jar packages and so packages and putting them into the main project respectively, there is only one copy of the jar package and the so package, avoiding errors caused by the existence of duplicate jar packages or so packages; at the same time, ensure that the main project stores the jar package and the so package, avoiding errors caused by the inability to find the jar package or so package when introducing each project or scene.
[0091] Step S106: Add ndk support to the tool build file corresponding to the main project and run the Android project.
[0092] Specifically, step S106 includes:
[0093] Determine the main project according to the scene corresponding to the current project.
[0094] Add ndk support to the tool build file corresponding to the main project and configure the CPU type of the Android device as armeabi-v7a; as Figure 11 shown, add ndk support to the tool build file (build.gradle file) corresponding to the main project, otherwise it will cause an error.
[0095] After the configuration is completed, run the Android project.
[0096] Furthermore, running the Android project includes:
[0097] Put the AAR packages that incorporate multiple Unitys into the said Android project and run the Android project. The Android project with multiple Unity AARs can then run, and SDK support can also be provided to customers.
[0098] From the above description, it can be seen that the present invention achieves the following technical effects:
[0099] The present invention maintains a consistent style theme by configuring property tags in the information description files of each project, and differentiates the Unity scenes corresponding to different projects. By removing the JAR packages and SO packages in the decompressed files and placing the removed JAR packages and SO packages into the main project respectively, conflicts that cause error reporting are avoided, solving the problems of duplicate SO packages extracted from the AAR packages in Unity multi-project packaging of AARs and style theme conflicts between multiple projects;
[0100] By introducing a first property tag that is consistent with the icon and theme of the main project, the style is maintained, theme conflicts are prevented, and error reporting caused by inconsistent icons or themes between projects is avoided;
[0101] By configuring a second property tag, an identity token for Unity to package AAR is added to differentiate the Unity scenes corresponding to each project, avoiding error reporting when multiple AAR files containing Unity are introduced into the Android project during packaging;
[0102] By selecting a non-duplicate copy from the removed multiple duplicate JAR packages and SO packages and placing them into the main project respectively, there is only one copy of the JAR package and the SO package, avoiding error reporting due to the existence of duplicate JAR packages or SO packages; at the same time, ensuring that the main project stores the JAR package and the SO package, avoiding error reporting due to the inability to find the JAR package or SO package when introducing each project or scene.
[0103] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0104] The embodiment of the present invention also provides a system for generating AARs for Android projects in Unity multi-project packaging for implementing the method for generating AARs for Android projects in Unity multi-project packaging as described above, as Figure 12 shown, the system includes:
[0105] A generating unit 121, configured to generate an Android project with multiple projects by using Unity, and each project corresponds to a scene;
[0106] Configuration unit 122, used to configure attribute tags in the information description files of each project;
[0107] Packaging unit 123, used to build a packaging task in multiple projects of unity after configuring the attribute tags, and generate a released aar package;
[0108] Removing unit 124, used to decompress the aar package and remove the jar package and so package in the decompressed file;
[0109] Placing unit 125, used to place the removed jar package and so package into the main project respectively;
[0110] Adding unit 126, used to add ndk support to the tool build file corresponding to the main project and run the Android project.
[0111] An embodiment of the present invention also provides an electronic device, as Figure 13 shown, the electronic device includes one or more processors 131 and a memory 132, Figure 13 Taking one processor 131 as an example.
[0112] The controller may further include: an input device 133 and an output device 134.
[0113] The processor 131, the memory 132, the input device 133 and the output device 134 may be connected through a bus or other means, Figure 13 Taking connection through a bus as an example.
[0114] The processor 131 may be a central processing unit (Central Processing Unit, abbreviated as CPU), and the processor 131 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), field programmable gate arrays (Field-Programmable Gate Array, abbreviated as FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. chips, or a combination of the above types of chips. The general-purpose processor may be a microprocessor or any conventional processor.
[0115] The memory 132, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the control method in the embodiments of the present invention. The processor 131 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 132, that is, to implement the method of generating an aar for a unity multi-project packaged Android project in the above method embodiments.
[0116] The memory 132 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the processing device of the server operation, etc. In addition, the memory 132 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 132 may optionally include a memory remotely set relative to the processor 131, and these remote memories can be connected to the network connection device through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0117] The input device 133 can receive input digital or character information, and generate key signal inputs related to user settings and function controls of the processing device of the server. The output device 134 may include a display device such as a display screen.
[0118] One or more modules are stored in the memory 132, and when executed by one or more processors 131, they execute as Figure 1 shown in the method.
[0119] Those skilled in the art can understand that to implement all or part of the processes in the above method embodiments, it can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the above embodiments of each motor control method. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory (FM), a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memories.
[0120] Although embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A method for generating aar by packaging multiple projects in Unity for Android. It is characterized in that include: Use Unity to generate a multi-project Android project, each project corresponds to a scene; In the information description file of each project, configure the attribute tag, wherein the configuration of the attribute tag includes: in the application declaration tag of the information description file of each project, configure the first attribute tag consistent with the icon and theme of the main project; for the metadata tag in the information description file of each project, configure the second attribute tag in the metadata tag whose name attribute is the unity scene, and add the unity package aar identity token to distinguish each scene; After configuring the property tags, build the packaging task in Unity's multi-project to generate the release version of the aar package; Decompress the aar package and remove the jar package and so package from the decompressed file; Put the removed jar packages and so packages into the main project respectively; Add ndk support to the tool build file corresponding to the main project and run the Android project.
2. The method according to claim 1, It is characterized in that The above mentioned packaging task is built in Unity's multi-project to generate a release version of the aar package, including: Pack in Unity's multi-project to generate a debug version of the aar package; After the debugging version of the aar package is debugged successfully, the release version of the aar package is obtained.
3. The method according to claim 1, It is characterized in that Decompress the aar package and remove the jar and so packages from the decompressed files, including: Unzip each aar package and analyze the unzipped files; Remove the duplicate unity-classes.jar and so packages from the decompressed files.
4. The method according to claim 1, It is characterized in that The steps of putting the removed jar packages and so packages into the main project include: Put the removed jar package into the libs folder of the main project; Put the armeabi-v7a folder containing the removed so package into the jniLibs folder created in advance in the main project, where the jniLibs folder is at the same level as the java folder in the main project.
5. The method according to claim 1, It is characterized in that Adding ndk support in the tool build file corresponding to the main project and running the Android project include: Determine the main project based on the scenario corresponding to the current project; Add ndk support in the tool build file corresponding to the main project, and configure the CPU type of the Android device to armeabi-v7a; After the configuration is complete, run the Android project.
6. The method according to claim 5, It is characterized in that Running the Android project includes: Add multiple unity aar packages into the Android project and run the Android project.
7. A system for generating aar from Unity multi-project packaging Android projects. It is characterized in that include: A generation unit, configured to generate Android projects for multiple projects using Unity, with each project corresponding to a scene; A configuration unit, configured to configure property tags in the information description files of each project. The configuration of property tags includes: configuring a first property tag that is consistent with the icon and theme of the main project in the application declaration tag of the information description file of each project; for the metadata tags in the information description files of each project, configuring a second property tag in the metadata tag whose name attribute is the Unity scene, and adding a Unity-packaged AAR identity token to distinguish each scene; A packaging unit, configured to build a packaging task in the multiple projects of Unity after configuring the property tags, and generate a release version of the AAR package; A removal unit, configured to decompress the AAR package and remove the JAR package and SO package in the decompressed file; A placement unit, configured to separately place the removed JAR package and SO package into the main project; An addition unit, configured to add NDK support to the tool build file corresponding to the main project and run the Android project.
8. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores computer instructions for causing a computer to execute the method for generating an AAR by packaging an Android project with multiple Unity projects according to any one of claims 1-6.
9. An electronic device, characterized in that, the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to cause the at least one processor to execute the method for generating an AAR by packaging an Android project with multiple Unity projects according to any one of claims 1-6.