apk是可以正常打包,但是…在手机上运行的时候会出现以下错误。
报错:
your hardware does not support this application,sorry!
= = 然后又是一通google,百度…几番尝试无果…
后来仔细查找Log发现是进入不了Unity界面。出现错误。
Unable to find main (Error)
又是经过一番查找…可算是解决了…万能的google…
这个好像是因为so文件出现的错误。
我的项目中只用到了armeabi-v7a。当接入其他sdk的时候会包含其他的so文件。
解决方案(一):
首先找到问题答案链接:Unable to find main (Error)
在gradle中添加:
意思是只用armeabi-v7a 打包apk。
android{
splits {
// Configures multiple APKs based on ABI.
abi {
// Enables building multiple APKs per ABI.
enable true
// By default all ABIs are included, so use reset() and include to specify that we only
// want APKs for x86, armeabi-v7a, and mips.
// Resets the list of ABIs that Gradle should create APKs for to none.
reset()
// Specifies a list of ABIs that Gradle should create APKs for.
include "armeabi-v7a"
}
}
}
解决方案(二):
如果上面方案不行的话可以尝试这个。
Android项目中嵌套unity出现your hardware does not support this application,sorry!