解决思路:

1、先使用Unity打出Android工程,再使用Android工程进行打包

1)修改CommandBuild.cs

在public static void Build()方法中修改

        {locationPathName ="Android_Build";buildOption |= BuildOptions.AcceptExternalModificationsToPlayer;BuildPipeline.BuildPlayer(ms_scenes, locationPathName, ms_buildTarget, buildOption);        }

关于BuildOptions.AcceptExternalModificationsToPlayer;配置相关文献查看

https://docs.unity3d.com/ScriptReference/BuildOptions.AcceptExternalModificationsToPlayer.html

Description

Used when building Xcode (iOS) or Eclipse (Android) projects.

On iOS, this setting will append an existing Xcode project. Existing Xcode project setting changes will be preserved. With the IL2CPP scripting backend, this setting will also allow incremental builds of the generated C++ code to work in Xcode.

On Android, this setting will create a new Eclipse project. Existing Eclipse project setting changes will be discarded.

2)再使用gradle命令进行打包

gradle -p ./(Project_Name) assembleRelease

 

2、直接修改CommandBuild.cs打出多个APK

修改CommandBuild.cs支持生成多个APK文件,理论上可行,待研究

更多相关文章

  1. android部署运行已有项目小结
  2. COCOS2D-X编译成android的项目
  3. Android原生项目引入最新的React Native包
  4. android studio 项目的版本问题
  5. 优秀Android开源项目
  6. Android新建项目报错android:icon="@drawable/ic_launcher"
  7. Android studio使用心得(九)------如何设置项目编码

随机推荐

  1. Android(安卓)关于嵌套listView时onItemC
  2. 工欲善其事必先利其器-Android(安卓)Stud
  3. Android(安卓)表单验证框架:AValidations
  4. Android(安卓)打测试包
  5. android adb 命令不能用
  6. CountDownTimer倒计时器的使用
  7. Android(安卓)Gradle 指定 Module 打包
  8. Android图片放大缩小实现方式(一)
  9. Android使用ImageLoader异步加载网络图片
  10. android 细节收集