MSDK接入 中的各种问题

检查顺序

  • 包名注意一下

Unity报:重复引用1

Found plugins with same names, Assets/Msdk/BuglyPlugins/Android/libs/buglyagent.jar and Assets/Plugins/Android/libs/buglyagent.jar. Delete the one of the duplicate plugins.

使用SDK的插件部署时复制过来的,结果导出安卓工程的时候造成错误。不确定新版有没有解决。

打安卓包理论上无关的插件

Exception: Unknown CPU architecture for library Assets/Msdk/BuglyPlugins/iOS/libBuglyBridge.a
UnityEditor.Android.PostProcessor.Tasks.NativePlugins.ProcessPlugin
MSDK接入 中的各种问题

原则上平台不应会有安卓,这里我已经去掉了。 同个文件夹下libBuglyBridge 和 BuglyBridge都要改。

导出时提示AutoActivity——appID 对不上

MSDK接入 中的各种问题
在AndroidManifest中修改即可,我也不知道为什么自动生成的没修改好。

Resource shrinker cannot be used for libraries

AndroidStudio在3.0之后会报的错误。条件之一是开启了混淆minifyEnabled true。

Attribute application@allowBackup value=(false) from AndroidManifest.xml:42:16-43 is also present at [:GooglePlay:] AndroidManifest.xml:22:18-44 value=(true).

Attribute application@allowBackup value=(false) from AndroidManifest.xml:42:16-43 is also present at [:GooglePlay:] AndroidManifest.xml:22:18-44 value=(true).
Suggestion: add ‘tools:replace=“android:allowBackup”’ to element at AndroidManifest.xml:42:3-165:17 to override.

在上一篇文章提到了,就是命名空间难搞一点。

PS:包名注意一下

我也是改了前面一堆才发现,虽然该提到第一个。但我留着嘲讽一下自己吧。

Program type already present

AGPBI: {“kind”:“error”,“text”:“Program type already present: android.support.annotation.AnyRes”,“sources”:[{}],“tool”:“D8”}
:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:transformDexArchiveWithExternalLibsDexMergerForDebug’.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: E:\FFOutput\BQM_814\BQM\build\intermediates\transforms\dexBuilder\debug\0.jar,
……
E:\FFOutput\BQM_814\BQM\build\intermediates\transforms\dexBuilder\debug\43.jar
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.annotation.AnyRes
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 6s
66 actionable tasks: 62 executed, 4 up-to-date

通常是包重复引用的问题,网上搜一下会有很多教我怎么查看依赖,怎么exclude的。但是搞到底也不知道是哪个jar文件重了。

PS:com.xxx.BuildConfig 冲突

本以为我闪光所有内容,重新导出工程就不会有问题了。但unity还是自动把MainActivity和BuildConfig打进了一个叫classes.jar的文件,随着默认加载全部Libs内容的指令造成冲突。
有类似问题的可以参考。

E/CRASH: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

E/CRASH: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build type ‘Release’, Scripting Backend ‘il2cpp’, CPU ‘x86’
Build fingerprint: ‘google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys’
Revision: ‘0’
pid: 6200, tid: 6222, name: UnityMain >>> com.tencent.ace.bqm <<<
eax 8ae057d4 ebx 7b5dcc8c ecx 7b5f98d0 edx 00000000
esi 8ae057d4 edi a85ac1e4
xcs 00000073 xds 0000007b xes 0000007b xfs 0000003b xss 0000007b
eip 7b1f473b ebp 7b4ce648 esp 8ae05780 flags 00010202
backtrace:
E/CRASH: #00 pc 000b173b /data/app/com.tencent.ace.bqm-3Um5gkgPqOHUpJPK3pT7bw==/lib/x86/libMSDKSystem.so
#01 pc 636e6574 <unknown/absolute>
E/MessageQueue: IdleHandler threw exception
java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
Build fingerprint: ‘google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.007/4586646:user/release-keys’
Revision: ‘0’
pid: 6200, tid: 6222, name: UnityMain >>> com.tencent.ace.bqm <<<
at libMSDKSystem.000b173b(Native Method)
at Unknown.636e6574(Unknown Source:0)

暂时未解决

上一篇:AndroidManifest.xml--android系统权限定义


下一篇:获取apk的版本号versionCode apk的版本名称VersionName