Category:1998 video games
Category:Windows games
Category:Windows-only games
Category:Video games developed in the United StatesQ:
Webcam issue in eclipse. Error: Unable to start activity ComponentInfo{com.example.prova/com.example.prova.AndroidCameraActivity}: java.lang.IllegalStateException: Target must not be null
I'm trying to make this simple project to run my own Android device on my laptop (Windows)
I've started the eclipse and I've loaded the project, to make sure that it will run the webcams on my pc.
Problem: The webcam is not loading, giving me an error :
Unable to start activity ComponentInfo{com.example.prova/com.example.prova.AndroidCameraActivity}: java.lang.IllegalStateException: Target must not be null
As a result, I can't see my webcam, on the "webcams" page.
Here is my activity (I'm loading the activity from my project):
package com.example.prova;
import android.app.Activity;
import android.content.Intent;
import android.hardware.Camera;
import android.hardware.Camera.Parameters;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
public class AndroidCameraActivity extends Activity {
public static final String EXTRA_MESSAGE = "com.example.prova.MESSAGE";
public static final String CAMERA_REQUEST_CODE = "android.hardware.camera2.any";
public static final String CAMERA_REQUEST_PERMISSION = "android.permission.CAMERA";
public static final String CAMERA_REQUEST_TOKEN = "android.permission.CAMERA_PERMISSION";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_android_camera); be359ba680
Related links:
Comments