Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8108645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:10:43+00:00 2026-06-06T01:10:43+00:00

Whenever the activity that initiates the scan happens, the android application force closes. It

  • 0

Whenever the activity that initiates the scan happens, the android application force closes. It worked at one point and suddenly won’t work anymore. Core.jar is in a lib folder.

Logcat:

11-08 18:13:16.490: E/AndroidRuntime(1667): FATAL EXCEPTION: main
11-08 18:13:16.490: E/AndroidRuntime(1667): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.picky.pickyeater/libcom.google.zxing.client.android.CaptureActivity}: java.lang.ClassNotFoundException: libcom.google.zxing.client.android.CaptureActivity in loader dalvik.system.PathClassLoader[/data/app/com.picky.pickyeater-1.apk]
11-08 18:13:16.490: E/AndroidRuntime(1667):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at android.os.Looper.loop(Looper.java:123)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at android.app.ActivityThread.main(ActivityThread.java:4627)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at java.lang.reflect.Method.invokeNative(Native Method)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at java.lang.reflect.Method.invoke(Method.java:521)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at dalvik.system.NativeStart.main(Native Method)
11-08 18:13:16.490: E/AndroidRuntime(1667): Caused by: java.lang.ClassNotFoundException: libcom.google.zxing.client.android.CaptureActivity in loader dalvik.system.PathClassLoader[/data/app/com.picky.pickyeater-1.apk]
11-08 18:13:16.490: E/AndroidRuntime(1667):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
11-08 18:13:16.490: E/AndroidRuntime(1667):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)

OnCreate():

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Intent intent = new Intent("com.google.zxing.client.android.SCAN");
        intent.putExtra("SCAN_MODE", "PRODUCT_MODE");
        startActivityForResult(intent, 0);
    }

AndroidManifest.xml excerpt:

<activity
            android:configChanges="orientation|keyboardHidden"
            android:name="com.google.zxing.client.android.CaptureActivity"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:windowSoftInputMode="stateAlwaysHidden" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter >
                <action android:name="com.google.zxing.client.android.SCAN" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

.classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="gen"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
        <classpathentry kind="lib" path="lib/gson-1.7.1.jar"/>
        <classpathentry kind="lib" path="lib/jsoup-1.6.1.jar"/>
        <classpathentry kind="lib" path="lib/core.jar"/>
        <classpathentry kind="output" path="bin/classes"/>
</classpath>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:10:44+00:00Added an answer on June 6, 2026 at 1:10 am

    I know that according to Sean above, this is technically incorrect, but this was solved by linking it in as a library.

    In ZXing:
    1. Right click on project
    2. Click Properties
    3. Click Android in the left hand side menu
    4. Check Is Library

    In my app:
    1. Right click on project
    2. Click Properties
    3. Click Android in the left hand side menu
    4. Click Add
    5. Select the ZXing project

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I click the button 1 , the application crashes(force closes). I am not
I have a media player that stops playing whenever the user closes the app,
When using the onPause method in the Android SDK, that code is run whenever
I've a workflow that has two receive activities in a pick activity. Whenever I
In my Android app, I have a main activity that serves as an entry
Here's the deal: I have an Android application that needs to call a web
I'm working on an application that currently has two activites, a log in activity
I am developing an application that needs to display a passcode screen whenever a
I have developed an activity that displays all the Contacts of Android phone and
Here's the scenario, I want to get Data from the Service to Activity Whenever

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.