1. Apply an external jar package
The most common way to put the jar package to be introduced in Project's Lib directory and Add JARs
2. Referencing Java Project
When I recently studied libgdx, I found that project can be referenced to each other, limited to Java Project,android Project can only reference Java project, cannot be directly referenced, if you need to invoke the code in Android project ,
Need to turn to Java project to refer to the code SRC specifically for a Java project, ADD JARs Android-2.0.jar
@ can refer to Android project see 3
Projects connecting an external Java project
Androidproject turn into Java project
The advantage of this is that we can use the source of external projects to carry out the joint adjustment , or more convenient.
3. Referencing Android Project
2011.9.7
Android 2.2 will be able to reference Android project after Android
Android.library Property
Create and use Android Library project
Lib project is set to is Library Default.properties will have one more android.library=true
Main project refers to the LIB project default.properties that just now has one more android.library.reference.1=. /libproject
Note the points:
1. Androidmanifest.xml only main project is valid, the permissions and activity statements in Lib Project's androidmanifest must be written in main project Androidmanifest In
2. You can apply the resources below Res in Lib project, but the resource name cannot be the same, otherwise you can only use the resources under main project
main project will generate 2 fully same the R.java
Resource intermodulation This piece still needs more practice to know the effect
3. When Lib project has an external LIB jar package, main project also needs to introduce a change jar package
4. This method needs to be used with caution, when the project is large, eclipse speed will be very slow ~ ~"The pit Daddy, the speed is too slow can only give up this way."
5. The R file for Lib project is not final and cannot be handled by a switch case
Eclipse references external Project Android library