Sdkbox IAP v2.6.0.1 error: package com.sdkbox.plugin does not exist

Sdkbox IAP v2.6.0.1 error: package com.sdkbox.plugin does not exist
0

I can’t build sdkbox IAP v2.6.0.1(Cocos Creator v2.3.0) by Android Studio. It has an error:

error: package com.sdkbox.plugin does not exist

I can see ‘jni’ folder in directory but it didn’t show up in project

in log

Task :game:compileReleaseJavaWithJavac FAILED
file or directory ‘/Volumes/MacSSD/CocosGames/Bounce/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/main/java’, not found
file or directory ‘/Volumes/MacSSD/CocosGames/Bounce/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/libs’, not found

1 Like

Android Studio error “cannot resolve symbol”, tried “Invalidate cache and restart” but nothing change.

Thanks for feedback.

solution 1

~/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio [master] $ git diff settings.gradle
diff --git a/frameworks/runtime-src/proj.android-studio/settings.gradle b/frameworks/runtime-src/proj.android-studio/settings.gradle
index 6ca9d81..b87fca6 100755
--- a/frameworks/runtime-src/proj.android-studio/settings.gradle
+++ b/frameworks/runtime-src/proj.android-studio/settings.gradle
@@ -1,4 +1,4 @@
-include ':libcocos2dx',':game', ':instantapp'
+include ':libcocos2dx'
 project(':libcocos2dx').projectDir = new File('/Users/admin/Applications/ccc231/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/libcocos2dx')
 include ':hello_world'

solution 2

plz copy folder

ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/libs

to

ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/libs

reason:

> Task :game:compileDebugJavaWithJavac FAILED
file or directory '/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/main/java', not found
file or directory '/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/libs', not found
Executing transform IdentityTransform -> IdentityTransform on file /Users/admin/Applications/ccc231/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/java/libs/okhttp-3.12.7.jar
Executing transform IdentityTransform -> IdentityTransform on file /Users/admin/Applications/ccc231/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/java/libs/com.android.vending.expansion.zipfile.jar
Executing transform IdentityTransform -> IdentityTransform on file /Users/admin/Applications/ccc231/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/java/libs/okio-1.15.0.jar
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact instantapps.aar (com.google.android.instantapps:instantapps:1.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-instantapps.aar (com.google.android.gms:play-services-instantapps:16.0.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-base.aar (com.google.android.gms:play-services-base:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-tasks.aar (com.google.android.gms:play-services-tasks:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-tasks.aar (com.google.android.gms:play-services-tasks:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-v4.aar (com.android.support:support-v4:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-media-compat.aar (com.android.support:support-media-compat:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-fragment.aar (com.android.support:support-fragment:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-core-utils.aar (com.android.support:support-core-utils:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-core-ui.aar (com.android.support:support-core-ui:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-compat.aar (com.android.support:support-compat:26.1.0)
Executing transform IdentityTransform -> IdentityTransform on artifact support-annotations.jar (com.android.support:support-annotations:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact runtime.aar (android.arch.lifecycle:runtime:1.0.0)
Executing transform IdentityTransform -> IdentityTransform on artifact common.jar (android.arch.lifecycle:common:1.0.0)
Executing transform IdentityTransform -> IdentityTransform on artifact common.jar (android.arch.core:common:1.0.0)
Task ':game:compileDebugJavaWithJavac' is not up-to-date because:
  Task has failed previously.
All input files are considered out-of-date for incremental task ':game:compileDebugJavaWithJavac'.
Compiling with source level 1.7 and target level 1.7.
file or directory '/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/libs', not found
Executing transform IdentityTransform -> IdentityTransform on file /Users/admin/Applications/ccc231/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/java/libs/okhttp-3.12.7.jar
Executing transform IdentityTransform -> IdentityTransform on file /Users/admin/Applications/ccc231/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/java/libs/com.android.vending.expansion.zipfile.jar
Executing transform IdentityTransform -> IdentityTransform on file /Users/admin/Applications/ccc231/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/android/java/libs/okio-1.15.0.jar
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact instantapps.aar (com.google.android.instantapps:instantapps:1.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-instantapps.aar (com.google.android.gms:play-services-instantapps:16.0.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-base.aar (com.google.android.gms:play-services-base:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-tasks.aar (com.google.android.gms:play-services-tasks:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-tasks.aar (com.google.android.gms:play-services-tasks:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-v4.aar (com.android.support:support-v4:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-media-compat.aar (com.android.support:support-media-compat:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-fragment.aar (com.android.support:support-fragment:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-core-utils.aar (com.android.support:support-core-utils:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-core-ui.aar (com.android.support:support-core-ui:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact support-compat.aar (com.android.support:support-compat:26.1.0)
Executing transform IdentityTransform -> IdentityTransform on artifact support-annotations.jar (com.android.support:support-annotations:26.1.0)
Executing transform IdentityTransform -> ExtractAarTransform -> AarTransform on artifact runtime.aar (android.arch.lifecycle:runtime:1.0.0)
Executing transform IdentityTransform -> IdentityTransform on artifact common.jar (android.arch.lifecycle:common:1.0.0)
Executing transform IdentityTransform -> IdentityTransform on artifact common.jar (android.arch.core:common:1.0.0)
Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
file or directory '/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/main/java', not found
file or directory '/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/src/debug/java', not found
file or directory '/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/build/generated/source/aidl/debug', not found
Compiling with JDK Java compiler API.
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:35: 错误: 程序包com.sdkbox.plugin不存在
public class AppActivity extends com.sdkbox.plugin.SDKBoxActivity {
                                                  ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:37: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:39: 错误: 找不到符号
        super.onCreate(savedInstanceState);
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:42: 错误: 找不到符号
        if (!isTaskRoot()) {
             ^
  符号:   方法 isTaskRoot()
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:50: 错误: 不兼容的类型: AppActivity无法转换为Context
        SDKWrapper.getInstance().init(this);
                                      ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:54: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:56: 错误: 不兼容的类型: AppActivity无法转换为Context
        Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
                                                                        ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:59: 错误: 不兼容的类型: AppActivity无法转换为Context
        SDKWrapper.getInstance().setGLSurfaceView(glSurfaceView, this);
                                                                 ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:64: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:66: 错误: 找不到符号
        super.onResume();
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:71: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:73: 错误: 找不到符号
        super.onPause();
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:78: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:80: 错误: 找不到符号
        super.onDestroy();
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:83: 错误: 找不到符号
        if (!isTaskRoot()) {
             ^
  符号:   方法 isTaskRoot()
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:91: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:93: 错误: 找不到符号
        super.onActivityResult(requestCode, resultCode, data);
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:97: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:99: 错误: 找不到符号
        super.onNewIntent(intent);
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:103: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:105: 错误: 找不到符号
        super.onRestart();
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:109: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:111: 错误: 找不到符号
        super.onStop();
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:115: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:118: 错误: 找不到符号
        super.onBackPressed();
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:121: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:124: 错误: 找不到符号
        super.onConfigurationChanged(newConfig);
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:127: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:130: 错误: 找不到符号
        super.onRestoreInstanceState(savedInstanceState);
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:133: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:136: 错误: 找不到符号
        super.onSaveInstanceState(outState);
        ^
  符号:   变量 super
  位置: 类 AppActivity
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:139: 错误: 方法不会覆盖或实现超类型的方法
    @Override
    ^
/Users/admin/repos/ccc231/build/jsb-link/frameworks/runtime-src/proj.android-studio/src/org/cocos2dx/javascript/AppActivity.java:142: 错误: 找不到符号
        super.onStart();
        ^
  符号:   变量 super
  位置: 类 AppActivity
注: 某些消息已经过简化; 请使用 -Xdiags:verbose 重新编译以获得完整输出
33 个错误
:game:compileDebugJavaWithJavac (Thread[Task worker for ':' Thread 5,5,main]) completed. Took 0.619 secs.

error with :game module

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.