-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't run in android platform, report null pointer error, how to fix it #355
Comments
As 5.6.1p4 should have the fix and should not need net.gree.unitywebview.CUnityPlayerActivity, could you please adjust UnityWebViewPostprocessBuild.cs as below. --- UnityWebViewPostprocessBuild.cs.orig 2018-09-18 13:31:47.000000000 +0900
+++ UnityWebViewPostprocessBuild.cs 2018-09-18 13:32:07.000000000 +0900
@@ -69,14 +69,14 @@
doc.Save(manifest);
Debug.LogError("adjusted AndroidManifest.xml about android:hardwareAccelerated. Please rebuild the app.");
}
-#if UNITY_5_6_0 || UNITY_5_6_1
- if (activity != null
- && activity.GetAttribute("android:name") == "com.unity3d.player.UnityPlayerActivity") {
- activity.SetAttribute("name", "http://schemas.android.com/apk/res/android", "net.gree.unitywebview.CUnityPlayerActivity");
- doc.Save(manifest);
- Debug.LogError("adjusted AndroidManifest.xml about android:name. Please rebuild the app.");
- }
-#endif
+// #if UNITY_5_6_0 || UNITY_5_6_1
+// if (activity != null
+// && activity.GetAttribute("android:name") == "com.unity3d.player.UnityPlayerActivity") {
+// activity.SetAttribute("name", "http://schemas.android.com/apk/res/android", "net.gree.unitywebview.CUnityPlayerActivity");
+// doc.Save(manifest);
+// Debug.LogError("adjusted AndroidManifest.xml about android:name. Please rebuild the app.");
+// }
+// #endif
}
#endif
if (buildTarget == BuildTarget.iOS) { cf. #212 (comment)
|
yeah, thank you, it work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
09-18 11:09:58.346 16305-16305/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.star.webviewtest, PID: 16305
java.lang.Error: FATAL EXCEPTION [main]
Unity version : 5.6.1p4
Device model : samsung SM-N920S
Device fingerprint: samsung/noblelteskt/noblelteskt:7.0/NRD90M/N920SKSU2DQL1:user/release-keys
The text was updated successfully, but these errors were encountered: