我正在使用Unity 5.2.2p2,Facebook Unity SDK 7.2.2和Prime31的Android IAB插件2.9.当我编译我的应用程序并在设备上运行它时,在adb日志中我看到:
I/Unity (18149): AndroidJavaException: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.-----.----/com.facebook.unity.FBUnityLoginActivity}; have you declared this activity in your AndroidManifest.xml? I/Unity (18149): at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in:0 I/Unity (18149): at UnityEngine.AndroidJNISafe.CallStaticVoidMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in :0 I/Unity (18149): at UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) [0x00000] in :0 I/Unity (18149): at UnityEngine.AndroidJavaObject.CallStatic (System.String methodName, System.Object[] args) [0x00000] in :0 I/Unity (18149): at Facebook.Unity.Mobile.Android.FBJavaClass.CallStatic (System.String methodName, System.Object[] args) [0x00000] in :0 I/Unity (18149): at Facebook.Unity.Mobile.Android.AndroidFacebook.CallFB (System.String method, System.String args) [0x00000] in :0 I/Unity (18149): at Facebook.Unity.
但是在Assets/Plugins/Android/AndroidManifest.xml文件中,我有以下定义:
对我来说完全是无稽之谈.这曾经工作,我不知道为什么它不再存在.
只是想回答我已经设法修复它.这是Unity之一,您必须卸载所有插件并重新安装它们.找到与这两个插件相关的每个文件,删除它们,再一次安装一个.
此外,通过Smoola
2.9中的新集成,如果您不使用Smoola,则无论如何都会加载插件并检查是否存在Internet访问.这需要清单不包含的ACCESS_NETWORK_STATE
权限Prime31
.