在为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或电话兼容引起的。
任何人都可以告诉我导致此错误的原因以及如何解决?谢谢。