The app I am developing has many activities organized into seven java packages. Originally I wrote all the coding and stuff for each group of activities in a java package as
The problem may persist even if we change the manifest file.
to avoid it we must Add an import com.example.R;
in all our classes.
example: MainActivity.class in package2
pakage com.example.package2.Activity2
import com.example.R;
(TestActivity.class in package1)
pakage com.example.package1.Activity1
import com.example.R;