gree / gree/unity-webview

Unable to Create WebViewPlugin.Jar

Open
#500 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C++
Stars
2.7k
Forks
734
Avg merge
11h 39m
Merged PRs (30d)
1

Description

I made some changes, basically i just added a log as shown below

 @JavascriptInterface
    public void call(final String message) {
                 Log.d("its just a log CWebViewPlugin", cm.message());
        call("CallFromJS", message);
    }

I was unable to create jar file.
Please check the below log while im trying to execute "install.sh"

xxx-xxx:Android xxxx$ ./install.sh --debug
~/Downloads/unity-webview-master/plugins/Android ~/Downloads/unity-webview-master/plugins/Android

> Task :gradle_build:compileReleaseJavaWithJavac FAILED
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:7: error: cannot find symbol
    extends UnityPlayerActivity
            ^
  symbol: class UnityPlayerActivity
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:9: error: method does not override or implement a method from a supertype
    @Override
    ^
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:11: error: cannot find symbol
        requestWindowFeature(1);
        ^
  symbol:   method requestWindowFeature(int)
  location: class CUnityPlayerActivity
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:12: error: cannot find symbol
        super.onCreate(bundle);
        ^
  symbol:   variable super
  location: class CUnityPlayerActivity
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:13: error: cannot find symbol
        getWindow().setFormat(2);
        ^
  symbol:   method getWindow()
  location: class CUnityPlayerActivity
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:14: error: cannot find symbol
        mUnityPlayer = new CUnityPlayer(this);
        ^
  symbol:   variable mUnityPlayer
  location: class CUnityPlayerActivity
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:14: error: incompatible types: CUnityPlayerActivity cannot be converted to ContextWrapper
        mUnityPlayer = new CUnityPlayer(this);
                                        ^
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:15: error: cannot find symbol
        setContentView(mUnityPlayer);
                       ^
  symbol:   variable mUnityPlayer
  location: class CUnityPlayerActivity
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:16: error: cannot find symbol
        mUnityPlayer.requestFocus();
        ^
  symbol:   variable mUnityPlayer
  location: class CUnityPlayerActivity
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CWebViewPlugin.java:73: error: cannot find symbol
                 Log.d("Nsks CWebViewPlugin", cm.message());
                                              ^
  symbol:   variable cm
  location: class CWebViewPluginInterface
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/src/main/java/net/gree/unitywebview/CWebViewPlugin.java:73: error: cannot find symbol
                 Log.d("Nsks CWebViewPlugin", cm.message());
                 ^
  symbol:   variable Log
  location: class CWebViewPluginInterface
Note: /Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/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
11 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':gradle_build: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

BUILD FAILED in 1s
21 actionable tasks: 19 executed, 2 up-to-date
/Users/xxxx/Downloads/unity-webview-master/plugins/Android/gradle_build/build/intermediates/classes/release/net : no such file or directory
added manifest

BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
~/Downloads/unity-webview-master/plugins/Android
xxxx-xxxx:Android xxxx$ 

Please point me in the right direction.
Thank you

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running install.sh --debug and read the compileReleaseJavaWithJavac output. Inspect gradle_build/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java and CWebViewPlugin.java, focusing on the missing UnityPlayerActivity, mUnityPlayer, Log, and cm symbols. Done means the Android build completes without compilation errors and creates the WebViewPlugin JAR.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, unity
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.