Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Unable to start activity ComponentInfo{com.example/com.artifex.mupdfdemo.MuPDFActivity}: java.lang.NullPointerException"
    primarykey
    data
    text
    <p>I wanted to add MuPDF class into my android project. I do all stuff <a href="http://mupdf.blogspot.com/" rel="nofollow">in the link</a> successfully. And I added all files into my application from <code>/mupdf-source/android/</code>.</p> <p>After I added MuPDFActivity to my Manifest.xml.</p> <pre><code>&lt;activity android:name="com.artifex.mupdfdemo.MuPDFActivity" android:screenOrientation="landscape"&gt; &lt;/activity&gt; </code></pre> <p>To open MuPDFActivity I use this code.</p> <pre><code>Uri uri = Uri.parse("/storage/sdcard0/file.pdf"); Intent intent = new Intent(CarDetail.this,MuPDFActivity.class); intent.setAction(Intent.ACTION_VIEW); intent.setData(uri); startActivity(intent); </code></pre> <p>But when I run the code I get these errors from the LogCat</p> <pre><code>07-08 13:52:03.137: E/AndroidRuntime(16925): FATAL EXCEPTION: main 07-08 13:52:03.137: E/AndroidRuntime(16925): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.artechin.mbtkatalog/com.artifex.mupdfdemo.MuPDFActivity}: java.lang.NullPointerException 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110) 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135) 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.app.ActivityThread.access$700(ActivityThread.java:140) 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.os.Handler.dispatchMessage(Handler.java:99) 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.os.Looper.loop(Looper.java:137) 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.app.ActivityThread.main(ActivityThread.java:4921) 07-08 13:52:03.137: E/AndroidRuntime(16925): at java.lang.reflect.Method.invokeNative(Native Method) 07-08 13:52:03.137: E/AndroidRuntime(16925): at java.lang.reflect.Method.invoke(Method.java:511) 07-08 13:52:03.137: E/AndroidRuntime(16925): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) 07-08 13:52:03.137: E/AndroidRuntime(16925): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) 07-08 13:52:03.137: E/AndroidRuntime(16925): at dalvik.system.NativeStart.main(Native Method) 07-08 13:52:03.137: E/AndroidRuntime(16925): Caused by: java.lang.NullPointerException 07-08 13:52:03.137: E/AndroidRuntime(16925): at com.artifex.mupdfdemo.MuPDFActivity.makeButtonsView(MuPDFActivity.java:835) 07-08 13:52:03.137: E/AndroidRuntime(16925): at com.artifex.mupdfdemo.MuPDFActivity.createUI(MuPDFActivity.java:416) 07-08 13:52:03.137: E/AndroidRuntime(16925): at com.artifex.mupdfdemo.MuPDFActivity.onCreate(MuPDFActivity.java:337) 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.app.Activity.performCreate(Activity.java:5188) 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) 07-08 13:52:03.137: E/AndroidRuntime(16925): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074) 07-08 13:52:03.137: E/AndroidRuntime(16925): ... 11 more </code></pre> <p>What can be the problem? How can I solve it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload