无法在Android Studio和Unity中将libmain.so加载为库 [英] Unable to load libmain.so in Android studio and Unity as library

查看:2101
本文介绍了无法在Android Studio和Unity中将libmain.so加载为库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的毕业项目有问题,我将Unity作为库添加到Android Studio,可以在我的手机上正常工作,但是当我尝试在其他Android手机上时,我遇到了一些奇怪的错误(无法加载 libmain .so ),我进行了很多搜索,但没有找到答案.

I have a problem in my graduation project, I add Unity as a library to Android Studio it works fine with my mobile, but when I try on the other Android mobile I got some weird error (unable to load libmain.so), I search a lot but I didn't find the answer.

注意:只有当我单击按钮(在android项目上)转到Unity项目时,才没有编译或生成错误.

Note: there is no compile or build error, only when I click on the button(on android project) to go to Unity project.

推荐答案

请在您的string.xml中添加以下行

Please add following line into your string.xml

<string name="game_view_content_description">Game view</string>

之后,将以下代码段添加到应用程序级别的gradle文件中

After that add below snippet into your app level's gradle file

defaultConfig {
        ndk {
            abiFilters 'armeabi-v7a', 'x86'
        }
    }

这篇关于无法在Android Studio和Unity中将libmain.so加载为库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆