I wirte a demo to use ant build the android project, but there is some
problem with it.
There are 2 classes "TestActivity.java" and "Config.java"
Config
===============================================
public class Config {
/** Whether or not to include logging statements in the
application. */
public final static boolean LOGGING = false;
public static void initConfig() {
// Do nothing.
}
}
===============================================
TestActivity.onCreate()
===============================================
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Config.LOGGING)
{
Log.d(TAG, "[onCreate] Success");
}
setContentView(R.layout.main);
}
===============================================
I use the var LOGGING in Config class to turn log on or off, but when
I modity it, and run ant release
the ant can't find the dependency between Config and TestActivity. it
just recompile the Config class.
ref ant task javac:
"Apache Ant uses only the names of the source and class files to find
the classes that need a rebuild. It will not scan the source and
therefore will have no knowledge about nested classes, classes that
are named different from the source file, and so on"
I find two solutions, but all of them, I am not very satisfied.
solution:
1. before compile, clean all classes.
2. call a Config's function in TestActivity.onCreate(), such as
Config.initConfig().
I search on google, I find the javamake and jikes, but all of them
seem didn't work correct when a build the android project.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en