상세 컨텐츠

본문 제목

cocos creator [js] Error

개발생활/Cocos2d

by 한국인맛집 2021. 7. 22. 14:10

본문

반응형

Error 1.

':app:transformClassesAndResourcesWithProguardForRelease':

 

 

solution 1

 

[Project_game_name]/build.gradle

Add Code

-ignorewarnings
-keep class * {
    public private *;
}

 

 

Error 2.

 jni/../../jni/../../Classes/PluginIAPJSHelper.cpp:53:9:

error: no member named 'Director' in namespace 'cocos2d'

[armeabi-v7a] Compile++ arm  : cocos2djs_shared <= PluginIAPJSHelper.cpp        RUN_ON_MAIN_THREAD_BEGIN

 

 

solution 2

 

xx.hpp , xx.cpp, xx.h

Change Code   cocos2d::Director()-> ...                ====>    cocos2d::Application()->

//auto scheduler = cocos2d::Director::getInstance()->getScheduler();
// Director 를  Application 변경

auto scheduler = cocos2d::Application::getInstance()->getScheduler();

 

 


 

Error 3   

java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex 

 

 

 

solution 3

build.gradle

android {
    defaultConfig {   
        multiDexEnabled true     // Add
    }
    
}

 

 

 

반응형

관련글 더보기