1. When the new Android Library Project works or existing works into Android Library Project, if the following statement engineering source code:
action1();
break;
case R.id.button2:
action2();
break;
case R.id.button3:
action3();
break;
}
See http://tools.android.com/tips/non-constant-fields official explanation. So the above example R.id.button1 not ask constants, can not be used in switch architecture, the simple solution
Is converted to the switch if-else statements, it is very easy to implement in the eclipse, the cursor on the key switch, be installed for press ctrl + 1, FIG press
![](https://img-my.csdn.net/uploads/201212/06/1354761482_2983.jpg)
2. If A ndroid Library Project has Activity, it can no longer manifest file storage project in the statement, but it must be declared in the project to use the library, because the manifest configuration file is independent to the project, can not be reused.
3. If A ndroid Library Project jar used in third-party packages, but also talk about the use of project import the library
Reproduced in: https: //www.cnblogs.com/Codenewbie/p/3374719.html
1. When the new Android Library Project works or existing works into Android Library Project, if the following statement engineering source code:
action1();
break;
case R.id.button2:
action2();
break;
case R.id.button3:
action3();
break;
}
See http://tools.android.com/tips/non-constant-fields official explanation. So the above example R.id.button1 not ask constants, can not be used in switch architecture, the simple solution
Is converted to the switch if-else statements, it is very easy to implement in the eclipse, the cursor on the key switch, be installed for press ctrl + 1, FIG press
![](https://img-my.csdn.net/uploads/201212/06/1354761482_2983.jpg)
2. If A ndroid Library Project has Activity, it can no longer manifest file storage project in the statement, but it must be declared in the project to use the library, because the manifest configuration file is independent to the project, can not be reused.
3. If A ndroid Library Project jar used in third-party packages, but also talk about the use of project import the library