【AndroidStudio】引用UnityPlayerActivity报错解决方案
问题:继承UnityPlayerActivity出现报错cannot access IUnityPlayerLifecycleEvents class file for
参考原文:记录android项目接入u3d的过程
解决方案:
1、打开settings.gradle文件添加
project(':unityLibrary').projectDir=new File('..\\OutAndroid\\unityLibrary')
2、打开build.gradle(Module: app)文件添加
implementation fileTree(dir: project(':unityLibrary').getProjectDir().toString() + ('\\libs'),includes: ['*.jar'])
3.打开build.gradle(Project)文件添加
flatDir{ dirs "${project(':unityLibrary').projectDir}/libs" }
问题解决!!