I'm trying to implement functionality similar to Android Keystore Direct access. The code is making use of IPC and an exception is thrown when mRemote.transact was called (IKeystoreService.java line 54)
This works well on versions of Android before Marshmallow (API 23). I know the permissions model has changed since.
The exception is:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.example.activity.MainActivity}: java.lang.SecurityException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.SecurityException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:503)
at com.example.utilities.security.IKeystoreService$Stub$Proxy.test(IKeystoreService.java:55)
at com.example.utilities.security.KeyStoreKk.state(KeyStoreKk.java:93)
at com.example.utilities.security. Cryto.isPasswordPinEnabled(Cryto.java:198)
at com.example.activity.MainActivity.onCreate(MainActivity.java:65)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Is there a particular permission I need to check for during runtime? Or is this another problem altogether?
Related
Any update on the following Android open bug,
04-16 16:12:24.585 28935-28935/ssdsor.qusdse.kalsdsadrket E/AndroidRuntime: FATAL EXCEPTION: main
Process: ssdsor.qusdse.kalsdsadrket, PID: 28935
java.lang.RuntimeException: InputChannel is not initialized.
at android.view.InputEventReceiver.nativeInit(Native Method)
at android.view.InputEventReceiver.<init>(InputEventReceiver.java:70)
at android.view.ViewRootImpl$WindowInputEventReceiver.<init>(ViewRootImpl.java:6067)
at android.view.ViewRootImpl.setView(ViewRootImpl.java:628)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:310)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3187)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2495)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I see this thread and may one ask the same on StackOverflow.But no fix any were.Is this bug under treatment or still open?
I used this library https://github.com/liuguangqiang/IPicker
This is my code:
public void onClick(View view) {
switch (view.getId()) {
case R.id.ll_profile_pic_container:
IPicker.open(getApplicationContext(), selectPictures);
return;
...
}
This is the error I receive when in activity com.liuguangqiang.ipicker.IPickerActivity I select my image from the gallery:
java.lang.RuntimeException: Unable to start activity ComponentInfo{rp.com.bmicalculator/com.liuguangqiang.ipicker.crop.CropImageActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setHomeAsUpIndicator(int)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setHomeAsUpIndicator(int)' on a null object reference
at com.liuguangqiang.ipicker.crop.CropImageActivity.initToolbar(CropImageActivity.java:116)
at com.liuguangqiang.ipicker.crop.CropImageActivity.onCreate(CropImageActivity.java:91)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I've followed all the directions I've provided from the library author ... Can the bug be in the library? No, because I've tested the app created by the same author and everything works perfectly ...
So, I installed the library you mentioned. Everything seems to work well. Maybe you are using AppTheme with no ActionBar?
i was looking for a torrent library for android and came-across ttorrent
.when i tried to add dependencty to gradle it gave me errors regarding slf4j-log4j12.
i ended up adding all jar files manually and managed to run the app using sample code.
But i am getting this error now.
ClassLoader referenced unknown path: /data/app/com.test.torrent-1/lib/arm64
android.os.NetworkOnMainThreadException
at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1273)
at java.net.InetAddress.lookupHostByName(InetAddress.java:431)
at java.net.InetAddress.getLocalHost(InetAddress.java:409)
at com.test.torrent.MainActivity.onCreate(MainActivity.java:26)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
i think it is trying to find a library but i cannot find it , that path does not exist in my mobile , any help?
I'm having a crash on my application due to a crash in Google Maps code. It's still the version 1 of Google play services (4.x)
I'm totally unable to reproduce this crash. (Nexus 5x, Galaxy S4) I can't find something similar on the internet (neither the same issue nor another one with the same method calls/etc. )
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{[xxx].app2/[xxx].app.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at com.google.maps.api.android.lib6.e.es.a(Unknown Source)
at com.google.maps.api.android.lib6.e.es.<init>(Unknown Source)
at com.google.maps.api.android.lib6.e.ev.a(Unknown Source)
at com.google.maps.api.android.lib6.e.af.a(Unknown Source)
at com.google.android.gms.maps.internal.w.onTransact(SourceFile:66)
at android.os.Binder.transact(Binder.java:387)
at com.google.android.gms.maps.internal.IMapViewDelegate$a$a.onCreate(Unknown Source)
at com.google.android.gms.maps.MapView$a.onCreate(Unknown Source)
at com.google.android.gms.dynamic.a$3.b(Unknown Source)
at com.google.android.gms.dynamic.a$1.a(Unknown Source)
at com.google.android.gms.maps.MapView$b.ip(Unknown Source)
at com.google.android.gms.maps.MapView$b.a(Unknown Source)
at com.google.android.gms.dynamic.a.a(Unknown Source)
at com.google.android.gms.dynamic.a.onCreate(Unknown Source)
at com.google.android.gms.maps.MapView.onCreate(Unknown Source)
at [xxx].app.views.MapWithSearchView.onCreate(MapWithSearchView.java:124)
at [xxx].app.MainActivity.onCreate(MainActivity.java:279)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Where [xxx] is my application package name.
I am trying to run the QR scanner app downloaded from
http://kvenkataprasad.blogspot.in/2015/01/bar-code-and-qr-code-scanner-example.html?showComment=1449051540990#c226949441944394510
App getting started but when I am clicking the scan button, the app get crashed.
Following the log of crash.
13239-13239/com.kvprasad.zbarbarcodescanner E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.kvprasad.zbarbarcodescanner, PID: 13239
java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.kvprasad.zbarbarcodescanner-1/lib/arm/libzbarjni.so: has text relocations
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at net.sourceforge.zbar.ImageScanner.<clinit>(Unknown Source)
at com.kvprasad.zbarbarcodescanner.BarcodeScanner.initControls(BarcodeScanner.java:52)
at com.kvprasad.zbarbarcodescanner.BarcodeScanner.onCreate(BarcodeScanner.java:42)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I am not getting the main issue behind crashing because I am a newbie in android. Please guide me to solve the problem.
Thanks.