我在使用 Phonegap 的条形码扫描仪时遇到了一个基本的机器人错误。我确定它是一个简单的修复,或者我缺少的东西。我似乎无法将手指放在它上面。我已经导入了 com.google.zxing.client.android.R
错误代码:
04-29 05:49:38.448: E/AndroidRuntime(12450): java.lang.NoClassDefFoundError: com.google.zxing.client.android.R$layout
04-29 05:49:38.448: E/AndroidRuntime(12450): at com.google.zxing.client.android.CaptureActivity.onCreate(CaptureActivity.java:156)
04-29 05:49:38.448: E/AndroidRuntime(12450): at android.app.Activity.performCreate(Activity.java:4465)
04-29 05:49:38.448: E/AndroidRuntime(12450): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-29 05:49:38.448: E/AndroidRuntime(12450): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-29 05:49:38.448: E/AndroidRuntime(12450): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-29 05:49:38.448: E/AndroidRuntime(12450): at android.app.ActivityThread.access$600(ActivityThread.java:123)
捕获活动线
super.onCreate(icicle);
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
#156 --> setContentView(R.layout.capture);
CameraManager.init(getApplication());
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
resultView = findViewById(R.id.result_view);
statusView = (TextView) findViewById(R.id.status_view);