_:n65c3726dd2c145e29d20f27bdf5b37a2xb1
<http://schema.org/text>
"Its giving me this error:\n./TimeTravelActivity.java:16: error: incompatible types: Parcelable cannot be converted to EnergySource\n    EnergySource source = p;\n                          ^\n1 error\nbut it should be right\n```MainActivity.java\nimport android.os.Bundle;\nimport android.view.View;\nimport android.widget.Button;\nimport android.widget.EditText;\npublic class MainActivity extends Activity {\n  public Button goButton;\n  public EditText yearField;\n  @Override\n  protected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\ngoButton = (Button)findViewById(R.id.goButton);\nyearField = (EditText)findViewById(R.id.yearField);\n\nfinal EnergySource source = new EnergySource();\n\ngoButton.setOnClickListener(new View.OnClickListener() {\n  @Override\n  public void onClick(View v) {\n    // Add your code in here!\n    Intent intent = new Intent(MainActivity.this, TimeTravelActivity.class);\n    intent.putExtra(\"EXTRA_YEAR\", yearField.getText().toString());\n    intent.putExtra(\"EXTRA_ENERGY\", source);\n    startActivity(intent);\n  }\n});\n  }\n}\n```\n```TimeTravelActivity.java\nimport android.os.Bundle;\nimport android.view.View;\npublic class TimeTravelActivity extends Activity {\n  public String targetYear;\n  @Override\n  protected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activitytimetravel);\nIntent intent = getIntent();\ntargetYear = intent.getStringExtra(\"EXTRA_YEAR\");\nParcelable p = intent.getParcelableExtra(\"EXTRA_ENERGY\");\nEnergySource source = p;\n  }\n}\n```\n@Ben Jakuben (https://teamtreehouse.com/benjakuben)"
<https://teamtreehouse.com/community/timetravelactivityjava16-error-incompatible-types-parcelable-cannot-be-converted-to-energysource>