ATD android导入平台下java文件:点击工程->右键选择Build Path->Link Source->弹出界面后点击Browse->选择路径通常是"frameworks/cocos2d-x/cocos/platform/android/java/src"->修改"Folder name"因为src会重名
---------------------------------------------------下面为python拷贝assets代码------------------------------------------------------------------------------------------------------
# !/usr/bin/env python
# -*- coding: utf-8 -*-
# author: 2016 sleaf.ye
import shutil
import os
import sys
sys.path.append(os.path.split(os.path.realpath(__file__))[0]+"/../")
from common import config
def run():
projPath = r"E:/gitworkspace/code/client/FGame"
outputPath = r"E:/gitworkspace/code/client/FGame/frameworks/runtime-src/proj.android/assets"
resPath = projPath + "/res"
outputResPath = outputPath + "/res"
if os.path.exists(outputResPath):
print "clean file " + outputResPath
shutil.rmtree(outputResPath)
else:
os.makedirs(outputResPath)
print("start copy " + resPath + " to " + outputResPath)
for f in os.listdir(resPath):
if f.startswith('.') or f.startswith('$'):
continue
cPath = resPath+"/"+f
if os.path.isdir(cPath):
shutil.copytree(cPath,outputResPath+"/"+f)
elif os.path.isfile(cPath):
shutil.copy(cPath,outputResPath)
srcPath = projPath + "/src"
outputSrcPath = outputPath + "/src"
if os.path.exists(outputSrcPath):
print "clean file " + outputSrcPath
shutil.rmtree(outputSrcPath)
else:
os.makedirs(outputSrcPath)
print("start copy " + srcPath + " to " + outputSrcPath)
for f in os.listdir(srcPath):
if f.startswith('.') or f.startswith('$'):
continue
cPath = srcPath+"/"+f
if os.path.isdir(cPath):
shutil.copytree(cPath,outputSrcPath+"/"+f)
elif os.path.isfile(cPath):
shutil.copy(cPath,outputSrcPath)
shutil.copy(projPath + "/config.json", outputPath)
print("copy success")
if __name__== "__main__":
run()
os.system("pause")