在为 Android 制作 Unity3D 插件时,我遇到了这个错误。
08-29 20:57:56.544: W/NativeHelper(123): Failed to cache package shared libs
08-29 20:57:56.544: W/NativeHelper(123): java.io.IOException: Couldn't create cached binary /data/data/com.alpaca.billing/lib/libunity.so in /data/data/com.alpaca.billing/lib
08-29 20:57:56.544: W/NativeHelper(123): at com.android.internal.content.NativeLibraryHelper.copyNativeBinaryLI(NativeLibraryHelper.java:289)
08-29 20:57:56.544: W/NativeHelper(123): at com.android.internal.content.NativeLibraryHelper.copyNativeBinariesLI(NativeLibraryHelper.java:260)
08-29 20:57:56.544: W/NativeHelper(123): at com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:3474)
08-29 20:57:56.544: W/NativeHelper(123): at com.android.server.PackageManagerService.replaceNonSystemPackageLI(PackageManagerService.java:5834)
08-29 20:57:56.544: W/NativeHelper(123): at com.android.server.PackageManagerService.replacePackageLI(PackageManagerService.java:5800)
08-29 20:57:56.544: W/NativeHelper(123): at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:6136)
08-29 20:57:56.544: W/NativeHelper(123): at com.android.server.PackageManagerService.access$2200(PackageManagerService.java:145)
08-29 20:57:56.544: W/NativeHelper(123): at com.android.server.PackageManagerService$5.run(PackageManagerService.java:4820)
08-29 20:57:56.544: W/NativeHelper(123): at android.os.Handler.handleCallback(Handler.java:587)
08-29 20:57:56.544: W/NativeHelper(123): at android.os.Handler.dispatchMessage(Handler.java:92)
08-29 20:57:56.544: W/NativeHelper(123): at android.os.Looper.loop(Looper.java:143)
08-29 20:57:56.544: W/NativeHelper(123): at android.os.HandlerThread.run(HandlerThread.java:60)
我的 Unity3D 是 3.5.5f3,我在两部 Android 手机上对其进行了测试:1.Nexus S,Android 4.0。一切都很好。2.HTC Wildfire S,Android 2.3.3。Unity3D Android 插件示例没问题,我的插件有这个错误。
我在互联网上搜索过,发现有人遇到此错误,但没有找到原因和解决方案。我有足够的内部和 sd 空间来安装这个 apk。因为不知道是哪一部分导致这个错误,除了Unity3d论坛我也求助stackoverflow,可能是Android OS或者手机兼容性导致这个错误。</p>
任何人都可以告诉我是什么导致了这个错误以及如何解决它?谢谢你。