Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find symbol unityplayeractivity while building WebViewPlugin-*.aar.tmpl #1080

Open
b-phygtl opened this issue Jul 10, 2024 · 4 comments

Comments

@b-phygtl
Copy link

Hi,
I'm trying to build the WebViewPlugin-*.aar.tmpl. But I'm running into this build error.
Would it be possible to help me fix this ?

Thank you in advance.

> Task :webview:compileReleaseJavaWithJavac FAILED
F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CUnityPlayerActivity.java:7: error: cannot find symbol
    extends UnityPlayerActivity
            ^
  symbol: class UnityPlayerActivity
F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CUnityPlayerActivity.java:9: error: method does not override or implement a method from a supertype
    @Override
    ^
F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CUnityPlayerActivity.java:11: error: cannot find symbol
        requestWindowFeature(1);
        ^
  symbol:   method requestWindowFeature(int)
  location: class CUnityPlayerActivity
F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CUnityPlayerActivity.java:12: error: cannot find symbol
        super.onCreate(bundle);
        ^
  symbol:   variable super
  location: class CUnityPlayerActivity
F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CUnityPlayerActivity.java:13: error: cannot find symbol
        getWindow().setFormat(2);
        ^
  symbol:   method getWindow()
  location: class CUnityPlayerActivity
F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CUnityPlayerActivity.java:14: error: cannot find symbol
        mUnityPlayer = new CUnityPlayer(this);
        ^
  symbol:   variable mUnityPlayer
  location: class CUnityPlayerActivity
F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CUnityPlayerActivity.java:14: error: incompatible types: CUnityPlayerActivity cannot be converted to ContextWrapper
        mUnityPlayer = new CUnityPlayer(this);
                                        ^
F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CUnityPlayerActivity.java:15: error: cannot find symbol
        setContentView(mUnityPlayer);
                       ^
  symbol:   variable mUnityPlayer
  location: class CUnityPlayerActivity
F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CUnityPlayerActivity.java:16: error: cannot find symbol
        mUnityPlayer.requestFocus();
        ^
  symbol:   variable mUnityPlayer
  location: class CUnityPlayerActivity
Note: F:\unity-webview\plugins\Android\webview\src\main\java\net\gree\unitywebview\CWebViewPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
9 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':webview:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

@KojiNakamaru
Copy link
Member

You might not install required Unity versions. Could you please follow the following instruction.

https://github.com/gree/unity-webview/blob/323d5d3611c92632f259d2d2cdadc9bbbb0e9014/README.md#how-to-build-webviewplugin-aartmpl

@b-phygtl
Copy link
Author

You might not install required Unity versions. Could you please follow the following instruction.

https://github.com/gree/unity-webview/blob/323d5d3611c92632f259d2d2cdadc9bbbb0e9014/README.md#how-to-build-webviewplugin-aartmpl

Thanks for your response.

I have followed the instructions provided there. I have installed unity version 2022.3.8f1 and this 2019.4.40f1. As per instructions, I didn't find the Unity 5.6.1f1 here - https://unity.com/releases/editor/archive . It looks like Unity deprecated it ?

But it is looking like a CLASSPATH issue or some sort. Not sure how to proceed from here

@KojiNakamaru
Copy link
Member

I see. I'll later adjust install.sh to require only 2019.4.40f1. Meanwhile, could you please download the package from https://unity.com/ja/releases/editor/whats-new/5.6.1 .

@KojiNakamaru
Copy link
Member

I've adjusted install.sh in #1082 and updated binaries only with 2019.4.40f1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants