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

InAppBrowser.java:268:error: cannot find symbol #554

Closed
3 tasks
supersongpiao opened this issue Oct 15, 2019 · 9 comments · Fixed by #803
Closed
3 tasks

InAppBrowser.java:268:error: cannot find symbol #554

supersongpiao opened this issue Oct 15, 2019 · 9 comments · Fixed by #803

Comments

@supersongpiao
Copy link

Bug Report

Problem

The plugin version I am using is 3.1.1-dev.
WeChat9f2b4aa66dd21080b77ff4090f372313

Information

Command or Code

Environment, Platform, Device

Version information

Ionic:

Ionic CLI : 5.2.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic1 1.3.2
@ionic/v1-toolkit : not installed

Cordova:

Cordova CLI : 8.1.2 ([email protected])
Cordova Platforms : android 6.2.3
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 26 other plugins)

Utility:

cordova-res : 0.6.0 (update available: 0.8.0)
native-run : 0.2.7 (update available: 0.2.8)

System:

Android SDK Tools : 26.1.1 (/Users/rdc-002/Library/Android/sdk)
ios-deploy : 2.0.0
ios-sim : 6.1.2
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.10.0
OS : macOS Mojave
Xcode : Xcode 11.1 Build version 11A1027

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@jcesarmobile
Copy link
Member

The problem is you are using a very old version of cordova-Android, but the plugin should require that version, so should be fixed in the plugin engines so it doesn’t install in older versions

@supersongpiao
Copy link
Author

The problem is you are using a very old version of cordova-Android, but the plugin should require that version, so should be fixed in the plugin engines so it doesn’t install in older versions

Yes, I found out later. This version of plug-in requires Android API 26 or above. Can I know when the official version of 3.1.1 will be released?

@jcesarmobile
Copy link
Member

jcesarmobile commented Oct 21, 2019

I'm reopening because it's a bug, not that it doesn't work in older version, but that the engines in plugin.xml and package.json are not properly configured to let cordova know it's not compatible with older version.

As of 3.1.1 release date, I have no idea, sorry.

@jcesarmobile jcesarmobile reopened this Oct 21, 2019
@ejonnadula
Copy link

I am also facing same issue, Is there any fix/solution available

:compileDebugJavaWithJavacC:\BuildApk\UIWebview\APKTest\MyApp\platforms\android\src\org\apache\cordova\inappbrowser\InAppBrowser.java:1196: error: cannot find symbol
@TargetApi(Build.VERSION_CODES.N)
^
symbol: variable N
location: class VERSION_CODES
C:\BuildApk\UIWebview\APKTest\MyApp\platforms\android\src\org\apache\cordova\inappbrowser\InAppBrowser.java:268: error: cannot find symbol
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O) {
^
symbol: variable O
location: class VERSION_CODES
C:\BuildApk\UIWebview\APKTest\MyApp\platforms\android\src\org\apache\cordova\inappbrowser\InAppBrowser.java:272: error: cannot find symbol
((InAppBrowserClient)inAppWebView.getWebViewClient()).waitForBeforeload = false;
^
symbol: method getWebViewClient()
location: variable inAppWebView of type WebView
C:\BuildApk\UIWebview\APKTest\MyApp\platforms\android\src\org\apache\cordova\inappbrowser\InAppBrowser.java:1197: error: method does not override or implement a method from a supertype
@OverRide
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\BuildApk\UIWebview\APKTest\MyApp\platforms\android\src\org\apache\cordova\file\AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
FAILED

BUILD FAILED

Total time: 7.03 secs

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileDebugJavaWithJavac'.

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.
    CordovaError: Promise rejected with non-error: 'Error code 1 for command: cmd with args: /s,/c,"C:\BuildApk\UIWebview\APKTest\MyApp\platforms\android\gradlew cdvBuildDebug -b C:\BuildApk\UIWebview\APKTest\MyApp\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"'
    at C:\Users\ejonnadula\AppData\Roaming\npm\node_modules\cordova\bin\cordova:29:15
    at processTicksAndRejections (internal/process/task_queues.js:94:5)

@ejonnadula
Copy link

I am using cordova 5.1.1, android 5.1.1, ios 4.1.1 and [email protected]

@breautek
Copy link
Contributor

I am also facing same issue, Is there any fix/solution available

You're using ancient versions of the cordova cli and platforms that are no longer supported. The solution is to upgrade and refactor your app where necessary.

@jcesarmobile
Copy link
Member

while that should be the optimal solution, since the plugin doesn't require any cordova-android version, this should be fixed to compile in older versions, and then we can put the code back, properly configure the engines to require latest cordova-android and release a major version.

@ejonnadula
Copy link

while that should be the optimal solution, since the plugin doesn't require any cordova-android version, this should be fixed to compile in older versions, and then we can put the code back, properly configure the engines to require latest cordova-android and release a major version.

Thanks for the information, I have pointed to android-29 and it started working.

@ejonnadula
Copy link

I am also facing same issue, Is there any fix/solution available

You're using ancient versions of the cordova cli and platforms that are no longer supported. The solution is to upgrade and refactor your app where necessary.

Thanks breautek, since this is old project I will inform higher management to take decision. For now I have pointed to android-29 started working.

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