2014-10-12 4 views
1

ZXing 라이브러리를 사용하여 바코드 스캐너를 코딩하려고합니다.BarCodeScanner가 중지되었습니다.

내 앱을 시작할 때 모든 것이 정상입니다.

스캔 버튼을 누르면 팝업 창이 나타납니다. "BarCodeScanner가 중지되었습니다."

로그 캣 :

10-12 10:51:57.674: I/PersonaManager(13977): getPersonaService() name persona_policy 
 
10-12 10:51:57.824: I/Adreno-EGL(13977): <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_KK_2.7_RB1.04.04.02.007.050_msm8960_refs/tags/AU_LINUX_ANDROID_KK_2.7_RB1.04.04.02.007.050__release_AU() 
 
10-12 10:51:57.824: I/Adreno-EGL(13977): OpenGL ES Shader Compiler Version: 17.01.12.SPL 
 
10-12 10:51:57.824: I/Adreno-EGL(13977): Build Date: 03/28/14 Fri 
 
10-12 10:51:57.824: I/Adreno-EGL(13977): Local Branch: 
 
10-12 10:51:57.824: I/Adreno-EGL(13977): Remote Branch: refs/tags/AU_LINUX_ANDROID_KK_2.7_RB1.04.04.02.007.050 
 
10-12 10:51:57.824: I/Adreno-EGL(13977): Local Patches: NONE 
 
10-12 10:51:57.824: I/Adreno-EGL(13977): Reconstruct Branch: NOTHING 
 
10-12 10:51:57.864: D/OpenGLRenderer(13977): Enabling debug mode 0 
 
10-12 10:52:01.308: D/AndroidRuntime(13977): Shutting down VM 
 
10-12 10:52:01.318: W/dalvikvm(13977): threadid=1: thread exiting with uncaught exception (group=0x418e9da0) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): FATAL EXCEPTION: main 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): Process: com.example, PID: 13977 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example/com.google.zxing.client.android.CaptureActivity}: java.lang.ClassNotFoundException: Didn't find class "com.google.zxing.client.android.CaptureActivity" on path: DexPathList[[zip file "/data/app/com.example-8.apk"],nativeLibraryDirectories=[/data/app-lib/com.example-8, /vendor/lib, /system/lib]] 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2470) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at android.app.ActivityThread.access$900(ActivityThread.java:174) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1307) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at android.os.Handler.dispatchMessage(Handler.java:102) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at android.os.Looper.loop(Looper.java:146) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at android.app.ActivityThread.main(ActivityThread.java:5593) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at java.lang.reflect.Method.invokeNative(Native Method) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at java.lang.reflect.Method.invoke(Method.java:515) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at dalvik.system.NativeStart.main(Native Method) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.zxing.client.android.CaptureActivity" on path: DexPathList[[zip file "/data/app/com.example-8.apk"],nativeLibraryDirectories=[/data/app-lib/com.example-8, /vendor/lib, /system/lib]] 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at java.lang.ClassLoader.loadClass(ClassLoader.java:497) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at java.lang.ClassLoader.loadClass(ClassLoader.java:457) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at android.app.Instrumentation.newActivity(Instrumentation.java:1067) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2296) 
 
10-12 10:52:01.318: E/AndroidRuntime(13977): \t ... 12 more

여기 내 매니페스트입니다 :

<?xml version="1.0" encoding="utf-8"?> 
 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
 
    package="com.example" 
 
    android:versionCode="1" 
 
    android:versionName="1.0" > 
 
    
 
    <uses-sdk 
 
     android:minSdkVersion="11" 
 
     android:targetSdkVersion="18" /> 
 
    
 
    <uses-permission android:name="android.permission.CAMERA"/> 
 
     
 
    <application 
 
     android:allowBackup="true" 
 
     android:icon="@drawable/ic_launcher" 
 
     android:label="@string/app_name" 
 
     android:theme="@style/AppTheme" > 
 
     <activity 
 
      android:name="com.example.MainActivity" 
 
      android:label="@string/app_name" > 
 
      <intent-filter> 
 
       <action android:name="android.intent.action.MAIN" /> 
 
       <category android:name="android.intent.category.LAUNCHER" /> 
 
      </intent-filter> 
 
     </activity> 
 
      
 
     <activity 
 
       android:name="com.google.zxing.client.android.CaptureActivity" 
 
       android:screenOrientation="landscape" 
 
       android:configChanges="orientation|keyboardHidden" 
 
       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> 
 
    </application> 
 
</manifest>

나는 당신이 날 도울 수 있기를 바랍니다. :)

+0

매니페스트 파일 게시 – goonerDroid

+0

매니페스트가 첫 번째 게시물에 있습니다. – Aland

+0

이 응용 프로그램을 테스트중인 장치에 ZXING 응용 프로그램이 설치되어 있습니까? – Nabin

답변

0

Zxing을 프로젝트에 라이브러리로 가져와야합니다. 오류를보고 프로젝트에 종속성을 추가하지 않는 것으로 보입니다. Eclipse를 사용하는 경우 Zxing을 라이브러리로 추가하고 추가하십시오 라이브러리를 프로젝트에 추가하십시오.

dependencies { 
    compile 'com.google.zxing:core:3.0.0' 
} 

이 줄을 그라디언트 파일에 추가하십시오.

+0

Thanks! 나는 그것을 짐작했을 것이다. :) – Aland

관련 문제