Unity接一些原生Andorid的SDK时,经常会出现这个错:
W/System.err: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
解决方法是在android层写的java文件中用runOnUiThread()
原因就是android的UI更新要在UI主线程中,广告SDK一些回调并不是在这个线程中
参考资料:
https://www.jianshu.com/p/866743c0356b
https://blog.csdn.net/cf8833/article/details/90297775