The first package is com.first.one and the
second one is com.second.two
Both the packages use the same xml files..
My problem is that my code in the first package works fine but the second package doen’t..
I think the problem should be in the manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.first.one"
android:versionCode="1"
android:versionName="1.0" >
As only the first package com.first.one is used and the second is not used.
if that is the problem. How can I declare both the packages in manifest?
If this is not the problem then why doesn’t my code in the second package work?
The idea behind having separate packages is that secondary package(s) should supplement your application. For example, if you are writing an application that is to use a website API, you could keep that package, say com.websiteAPI and draw from its resources as necessary, by importing:
Another example would be to write a package specifically for global objects, say com.objects.
To contrast this, your own package (the one specified in the manifest) should contain any and all files that are specific to your application. Remember that you can set up the package to include subpackages though. For example, if you made:
You could reference your activities in the manifest by writing:
Hope this helps. ^_^