将Android应用程序移植到BB10 OS(BlackBerry)

时间:2015-01-10 23:50:48

标签: blackberry-10 blackberry-android

我正在尝试将原生Android应用程序移植到BB10 OS(BlackBerry)。我能够安装应用程序,但是当我启动它时,我看到了这个错误:

 FATAL EXCEPTION: main
 java.lang.RuntimeException: Unable to create application com.example.MyApplication: java.lang.SecurityException: Failed to open /dev/urandom for writing
     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4454)
     at android.app.ActivityThread.access$1300(ActivityThread.java:141)
     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
     at android.os.Handler.dispatchMessage(Handler.java:99)
     at android.os.Looper.loop(Looper.java:137)
     at android.app.ActivityThread.main(ActivityThread.java:5116)
     at java.lang.reflect.Method.invokeNative(Native Method)
     at java.lang.reflect.Method.invoke(Method.java:525)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
     at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.SecurityException: Failed to open /dev/urandom for writing
     at o.dD$if.Ë‹(:279)
     at o.dD$if.engineSetSeed(:215)
     at java.security.SecureRandom.setSeed(SecureRandom.java:243)
     at java.security.SecureRandom.setSeed(SecureRandom.java:258)
     at java.lang.reflect.Method.invokeNative(Native Method)
     at java.lang.reflect.Method.invoke(Method.java:525)
     at o.ff$Õ™.<clinit>(Unknown Source)
     at o.dA.ËŠ(:285)
     at o.dA.<init>(:99)
     at o.dA.ËŠ(:151)
     at com.example.MyApplication.ͺ(:182)
     at com.example.MyApplication.onCreate(:66)
     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4451)
     ... 10 more
 Caused by: java.io.FileNotFoundException: /dev/urandom: open failed: EACCES (Permission denied)
     at libcore.io.IoBridge.open(IoBridge.java:409)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
     at o.dD$if.Ë‹(:277)
     ... 23 more
 Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
     at libcore.io.Posix.open(Native Method)
     at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
     at libcore.io.IoBridge.open(IoBridge.java:393)
     ... 26 more
W/ActivityManager(6766745):   Force finishing activity com.example.android.agent/com.example.agent.activities.LaunchActivity
E/OrientationUtil(6766745): Unable to read sensor data. errno 11
D/dalvikvm(20689057): GC_CONCURRENT freed 307K, 5% free 10097K/10576K, paused 1ms+1ms, total 48ms

高度赞赏任何有关解决此问题的见解。

0 个答案:

没有答案