cocos使用VS2017做的游戏,打包apk出现大量语法错误?
VS运行都没有问题,为啥打包就出现语法错误?编译运行结果如下:D:\projects\LostRoutes>cocoscompile-pandroid编译模式:debug...
VS运行都没有问题,为啥打包就出现语法错误?
编译运行结果如下:
D:\projects\LostRoutes>cocos compile -p android
编译模式:debug
使用 Eclipse 工程:D:\projects\LostRoutes\proj.android
正在执行:'"E:\Android\android-sdk\tools\android" update project -t android-26 -
p D:\projects\LostRoutes\proj.android'
中间省略
[armeabi] Compile++ arm : cocostudio_static <= ListViewReader.cpp
jni/../../Classes/SettingScene.cpp: In member function 'virtual bool SettingLaye
r::init()':
jni/../../Classes/SettingScene.cpp:61:16: error: expected unqualified-id before
'default'
UserDefault * default = UserDefault::getInstance();
^
jni/../../Classes/SettingScene.cpp:61:16: error: expected initializer before 'de
fault'
jni/../../Classes/SettingScene.cpp:62:6: error: expected primary-expression befo
re 'default'
if (default->getBoolForKey(MUSIC_KEY))
^
jni/../../Classes/SettingScene.cpp:62:6: error: expected ')' before 'default'
jni/../../Classes/HelloWorldScene.cpp: In member function 'virtual bool HelloWor
ld::init()':
jni/../../Classes/HelloWorldScene.cpp:70:15: error: expected unqualified-id befo
re 'default'
UserDefault *default;
^
jni/../../Classes/SettingScene.cpp:70:6: error: expected primary-expression befo
re 'default'
if (default->getBoolForKey(SOUND_KEY))
^
jni/../../Classes/HelloWorldScene.cpp:70:15: error: expected initializer before
'default'
jni/../../Classes/SettingScene.cpp:70:6: error: expected ')' before 'default'
jni/../../Classes/HelloWorldScene.cpp:71:2: error: case label not within a switc
h statement
default = UserDefault::getInstance();
^
jni/../../Classes/HelloWorldScene.cpp:71:10: error: expected ':' before '=' toke
n
default = UserDefault::getInstance();
^
jni/../../Classes/SettingScene.cpp: In member function 'void SettingLayer::menuM 展开
编译运行结果如下:
D:\projects\LostRoutes>cocos compile -p android
编译模式:debug
使用 Eclipse 工程:D:\projects\LostRoutes\proj.android
正在执行:'"E:\Android\android-sdk\tools\android" update project -t android-26 -
p D:\projects\LostRoutes\proj.android'
中间省略
[armeabi] Compile++ arm : cocostudio_static <= ListViewReader.cpp
jni/../../Classes/SettingScene.cpp: In member function 'virtual bool SettingLaye
r::init()':
jni/../../Classes/SettingScene.cpp:61:16: error: expected unqualified-id before
'default'
UserDefault * default = UserDefault::getInstance();
^
jni/../../Classes/SettingScene.cpp:61:16: error: expected initializer before 'de
fault'
jni/../../Classes/SettingScene.cpp:62:6: error: expected primary-expression befo
re 'default'
if (default->getBoolForKey(MUSIC_KEY))
^
jni/../../Classes/SettingScene.cpp:62:6: error: expected ')' before 'default'
jni/../../Classes/HelloWorldScene.cpp: In member function 'virtual bool HelloWor
ld::init()':
jni/../../Classes/HelloWorldScene.cpp:70:15: error: expected unqualified-id befo
re 'default'
UserDefault *default;
^
jni/../../Classes/SettingScene.cpp:70:6: error: expected primary-expression befo
re 'default'
if (default->getBoolForKey(SOUND_KEY))
^
jni/../../Classes/HelloWorldScene.cpp:70:15: error: expected initializer before
'default'
jni/../../Classes/SettingScene.cpp:70:6: error: expected ')' before 'default'
jni/../../Classes/HelloWorldScene.cpp:71:2: error: case label not within a switc
h statement
default = UserDefault::getInstance();
^
jni/../../Classes/HelloWorldScene.cpp:71:10: error: expected ':' before '=' toke
n
default = UserDefault::getInstance();
^
jni/../../Classes/SettingScene.cpp: In member function 'void SettingLayer::menuM 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询