I have two package, for example, packageA and packageB.
in packageA I has a class named classA that take resource from R.java: example:
TextView textView = (TextView) findViewById(R.id.textView);
same with package B. I has a class named classB that take resource from R.java
EditText editText = (EditText) findViewById(R.id.EditText);
When I want android to run classB, I must change Android Manifest file, change default package from com.packageA to com.packageB, so classA will be notice error at above line. The same when I reverse.
So, How can I fixed this problem: use multi packages and many of them use Resource data. Please help me.
thanks 🙂
If the package specified in your manifest is
com.packageA, then in the files of packageA, you don’t need to do anything. In the files ofpackageB, useimport com.packageA.R;without changing the package name in the manifest. That way, your packageB can access the R.java file.