[Solved] android.content.ActivityNotFoundException: Unable to find explicit activity class

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.x210.communication/com.x210.communication.ShowActivity};have you declared this activity in your AndroidManifest.xml?

The root cause of the error is that the Activity is not registered in the manifest file.

Solution: Open the manifest file AndroidManifest.xml

Check whether the activity is registered as shown in the picture

If not, register it, and if so, change the code of android:name=, and fill in the path of package com.example.xml in front of it. Fill in the path of package com.example.jizhangben1 in front of it

 

This should be written clearly package name to register it can be successful, try “ctrl + left click” click on those blue Activity name can jump, run a success also on the line

If it does not work

Check whether the button controlling the jump to this interface is set

 Button btnadd = (Button)findViewById(R.id.btn_add);

   btnadd.setOnClickListener(this);

Similar Posts: