cannot find symbol unityplayeractivity while building WebViewPlugin-*.aar.tmpl
Open
Nobody has claimed this yet.
- Dominant language
- Objective-C++
- Stars
- 2.7k
- Forks
- 734
- Avg merge
- 11h 39m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plugins/Android/webview/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java and the :webview:compileReleaseJavaWithJavac failure shown in the report. Inspect how UnityPlayerActivity is supplied during the WebViewPlugin build, then rerun the release compilation. Done means the WebViewPlugin AAR template builds without the missing-symbol errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, unity
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100