Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialpratyush raj
7,097 Pointscan't use onBackPressed??
in the interactive app story i can't use the onBackPressed it is saying ; missing but even if i am giving ; nothing is happening can someone help me?????
pratyush raj
7,097 Pointspratyush raj
7,097 Pointscan someone please help this is my code ``` import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView;
import com.pratyush.interactivestory.R; import com.pratyush.interactivestory.model.page; import com.pratyush.interactivestory.model.story;
import java.util.Stack;
public class StoryActivity extends AppCompatActivity {
}```
it is saying on public void onBackPressed() { ; this is expected i don't know