@@ -53,8 +53,8 @@ bool androidProject::createProjectFile(){
5353 // Copy the `src/` folder from the template
5454 try {
5555 fs::copy (
56- templatePath / " ofApp" / " src " ,
57- projectDir / " ofApp" / " src " ,
56+ templatePath / " ofApp" ,
57+ projectDir / " ofApp" ,
5858 fs::copy_options::recursive | (bOverwrite ? fs::copy_options::overwrite_existing : fs::copy_options::update_existing)
5959 );
6060 } catch (fs::filesystem_error & e) {
@@ -63,7 +63,7 @@ bool androidProject::createProjectFile(){
6363 }
6464
6565 try {
66- fs::copy (templatePath / " res" , projectDir / " ofApp/res" , fs::copy_options::recursive);
66+ fs::copy (templatePath / " ofApp/src/ res" , projectDir / " ofApp/src /res" , fs::copy_options::recursive);
6767 } catch (fs::filesystem_error & e) {
6868 ofLogError (LOG_NAME) << " Error copying res folder: " << e.what ();
6969 }
@@ -78,8 +78,8 @@ bool androidProject::createProjectFile(){
7878 }
7979
8080 findandreplaceInTexfile (projectDir / " ofApp/res/values/strings.xml" , " TEMPLATE_APP_NAME" , projectName);
81- fs::path from = projectDir / " srcJava/ cc/openframeworks/APP_NAME " ;
82- fs::path to = projectDir / (" srcJava/ cc/openframeworks/" + projectName );
81+ fs::path from = projectDir / " ofApp/src/java/ cc/openframeworks/android " ;
82+ fs::path to = projectDir / (" ofApp/src/java/ cc/openframeworks/android " );
8383
8484 try {
8585 fs::create_directories (to.parent_path ());
@@ -88,8 +88,6 @@ bool androidProject::createProjectFile(){
8888 ofLogError (LOG_NAME) << " Error renaming package directory: " << e.what ();
8989 }
9090
91- findandreplaceInTexfile (to / " OFActivity.java" , " TEMPLATE_APP_NAME" , projectName);
92-
9391 ofLogNotice (LOG_NAME) << " Android Project created successfully!" ;
9492 return true ;
9593}
0 commit comments