def METHOD_NAME( appName, appPath, appDomain, appGenCpp ):
    appName = appName.strip()
    appPath = appPath.strip()
    appDomain = appDomain.strip()
    if ( len(appPath) > 0 ) and ( "." != appPath ):
        appPath = os.path.join(os.path.abspath(appPath), appName)
    appPackage = ("%s.%s" % (appDomain, appName.lower()))
    print( "App Name   : %s" % appName)
    print( "App Path   : %s" % appPath)
    print( "App Domain : %s" % appDomain)
    print( "App Package: %s" % appPackage)
    print( "" )
    cinderPath = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", ".."))
    templatePath = os.path.realpath(__file__)
    templatePath = os.path.join(os.path.dirname(templatePath), "template", "CinderApp")   
    asTemplatePath = os.path.join( templatePath, "androidstudio", "CinderApp")
    asProjPath = os.path.join(appPath, "androidstudio", appName)
    cinderRelPath = os.path.relpath(cinderPath, asProjPath)
    cinderRelPathApp = os.path.relpath(cinderPath, os.path.join(appPath, "androidstudio", appName, "app"))
    # Copy the CPP file
    if appGenCpp:
        srcCppFile = os.path.join(templatePath, "src", "CinderApp.cpp")
        dstCppFile = os.path.join(appPath, "src", ("%s.cpp" % appName))
        if not os.path.exists(os.path.dirname(dstCppFile)):
            os.makedirs(os.path.dirname(dstCppFile))
        if not os.path.exists(dstCppFile):
            lineReplaceCopy(appName, appPackage, cinderRelPath, cinderRelPathApp, srcCppFile, dstCppFile)
        else:
            print( "SKIPPED CPP GENERATION: File aready exits: %s" % dstCppFile )
    else:
        print( "SKIPPED CPP GENERATION" )
        pass
    # Copy the Android Studio project
    if not os.path.exists( asProjPath ):
        os.makedirs( asProjPath ) 
    # copy tree
    copy_tree( asTemplatePath, asProjPath )
    # Copy build.gradle
    srcFile = os.path.join( templatePath, "androidstudio", "CinderApp", "build.gradle")
    dstFile = os.path.join( asProjPath, "build.gradle")
    lineReplaceCopy(appName, appPackage, cinderRelPath, cinderRelPathApp, srcFile, dstFile)
    # Copy app/build.gradle
    srcFile = os.path.join( templatePath, "androidstudio", "CinderApp", "app", "build.gradle")
    dstFile = os.path.join( asProjPath, "app", "build.gradle")
    lineReplaceCopy(appName, appPackage, cinderRelPath, cinderRelPathApp, srcFile, dstFile)
    # Copy app/src/main/AndroidManifest.xml
    srcFile = os.path.join( templatePath, "androidstudio", "CinderApp", "app", "src", "main", "AndroidManifest.xml")
    dstFile = os.path.join( asProjPath, "app", "src", "main", "AndroidManifest.xml")
    lineReplaceCopy(appName, appPackage, cinderRelPath, cinderRelPathApp, srcFile, dstFile)
    # Copy app/src/main/res/values/strings.xml
    srcFile = os.path.join( templatePath, "androidstudio", "CinderApp", "app", "src", "main", "res", "values", "strings.xml")
    dstFile = os.path.join( asProjPath, "app", "src", "main", "res", "values", "strings.xml")
    lineReplaceCopy(appName, appPackage, cinderRelPath, cinderRelPathApp, srcFile, dstFile)
    # Create app/src/main/java/<appPackage>/<appName>Activity.java
    dstFile = os.path.join( asProjPath, "app", "src", "main", "java", appPackage.replace(".", "/"), "%sActivity.java" % appName)
    dirPath = os.path.dirname(dstFile)
    if not os.path.exists(dirPath):        
        os.makedirs(dirPath)
    outFile = open(dstFile, "w+")
    outFile.write("package %s;\n" % appPackage)
    outFile.write("\n")
    outFile.write("import org.libcinder.app.CinderNativeActivity;\n")
    outFile.write("\n")
    outFile.write("public class %sActivity extends CinderNativeActivity {\n" % appName)
    outFile.write("    static final String TAG = \"%sActivity\";\n" % appName)
    outFile.write("}\n")
    print("\nProject generated at: %s" % appPath)
    print("")
    pass