- // If we have library files, we're going to write our R.java file into
- // the appropriate class directory for those libraries as well.
- // e.g. gen/com/foo/app/lib/R.java
- if (bundle->getExtraPackages() != NULL) {
- // Split on colon
- String8 libs(bundle->getExtraPackages());
- char* packageString = strtok(libs.lockBuffer(libs.length()), ":");
- while (packageString != NULL) {
- // Write the R.java file out with the correct package name
- err = writeResourceSymbols(bundle, assets, String8(packageString), true);
- packageString = strtok(NULL, ":");
- }
- libs.unlockBuffer();
- }