java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

Apache's JIRA Issue Tracker | Satoshi Watanabe | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.

Root Cause Analysis

  1. java.lang.RuntimeException

    Can't create handler inside thread that has not called Looper.prepare()

    at android.os.Handler.<init>()
  2. Android Platform
    CursorLoader.<init>
    1. android.os.Handler.<init>(Handler.java:197)
    2. android.os.Handler.<init>(Handler.java:111)
    3. android.content.Loader$ForceLoadContentObserver.<init>(Loader.java:72)
    4. android.content.CursorLoader.<init>(CursorLoader.java:137)
    4 frames
  3. org.apache.cordova
    CameraLauncher$1.run
    1. org.apache.cordova.camera.FileHelper.getRealPathFromURI_API11to18(FileHelper.java:154)
    2. org.apache.cordova.camera.FileHelper.getRealPath(FileHelper.java:60)
    3. org.apache.cordova.camera.CameraLauncher.processResultFromGallery(CameraLauncher.java:620)
    4. org.apache.cordova.camera.CameraLauncher.access$000(CameraLauncher.java:66)
    5. org.apache.cordova.camera.CameraLauncher$1.run(CameraLauncher.java:778)
    5 frames
  4. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
    3. java.lang.Thread.run(Thread.java:841)
    3 frames