Put image = (ImageView)findViewById(R.id.imageView2);
after set content View.
You can find a view after setting view for activity.then only its identifies the id form xml layout.
setContentView(R.layout.activity_details);
image = (ImageView)findViewById(R.id.imageView2);