记录android项目接入u3d的过程

第一步:从u3d开发人员中获得module,然后倒入module


记录android项目接入u3d的过程
文章图片


记录android项目接入u3d的过程
文章图片
在build.gradle(Module: app)文件添加implementation project(path:':unityLibrary')、
ndk{
abiFilters'armeabi-v7a'
}


记录android项目接入u3d的过程
文章图片
问题一、继承UnityPlayerActivity出现报错cannot access IUnityPlayerLifecycleEvents class file for
解决办法:
1、打开settings.gradle文件添加
【记录android项目接入u3d的过程】

记录android项目接入u3d的过程
文章图片
2、打开build.gradle(Module: app)文件添加


记录android项目接入u3d的过程
文章图片
3.打开build.gradle(Project)文件添加


记录android项目接入u3d的过程
文章图片
最后编译一下,问题解决
问题二、进入UnityActivity出现报错Unable to start activity ComponentInfo{com.peijia.unitytestactivity/com.unity3d.player.UnityPlayerActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x0
解决办法:
打开app->res->values->strings.xml文件添加
Game view

    推荐阅读