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

Error when i build app #73

Open
fouzo09 opened this issue Mar 14, 2021 · 8 comments
Open

Error when i build app #73

fouzo09 opened this issue Mar 14, 2021 · 8 comments

Comments

@fouzo09
Copy link

fouzo09 commented Mar 14, 2021

/home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:123: error: cannot find symbol
[cordova] if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
[cordova] ^
[cordova] symbol: variable R
[cordova] location: class VERSION_CODES
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: variable Type
[cordova] location: class WindowInsets
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: method getInsetsController()
[cordova] location: class Window
[cordova] 3 errors
[cordova]
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:compileDebugJavaWithJavac'.
[cordova] > Compilation failed; see the compiler error output for details.
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 56s
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/gradlew: Command failed with exit code 1 Error output:
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:123: error: cannot find symbol
[cordova] if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
[cordova] ^
[cordova] symbol: variable R
[cordova] location: class VERSION_CODES
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: variable Type
[cordova] location: class WindowInsets
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: method getInsetsController()
[cordova] location: class Window
[cordova] 3 errors
[cordova]
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:compileDebugJavaWithJavac'.
[cordova] > Compilation failed; see the compiler error output for details.
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 56s
[ERROR] An error occurred while running subprocess cordova.

    cordova build android --device exited with exit code 1.
@marfrede
Copy link

marfrede commented Apr 2, 2021

same error here

@SantiagoIlli
Copy link

Same here!

@fouzo09
Copy link
Author

fouzo09 commented May 5, 2021

/home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:123: error: cannot find symbol
[cordova] if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
[cordova] ^
[cordova] symbol: variable R
[cordova] location: class VERSION_CODES
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: variable Type
[cordova] location: class WindowInsets
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: method getInsetsController()
[cordova] location: class Window
[cordova] 3 errors
[cordova]
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:compileDebugJavaWithJavac'.
[cordova] > Compilation failed; see the compiler error output for details.
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 56s
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/gradlew: Command failed with exit code 1 Error output:
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:123: error: cannot find symbol
[cordova] if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
[cordova] ^
[cordova] symbol: variable R
[cordova] location: class VERSION_CODES
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: variable Type
[cordova] location: class WindowInsets
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: method getInsetsController()
[cordova] location: class Window
[cordova] 3 errors
[cordova]
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:compileDebugJavaWithJavac'.
[cordova] > Compilation failed; see the compiler error output for details.
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 56s
[ERROR] An error occurred while running subprocess cordova.

    cordova build android --device exited with exit code 1.

I solved by upgrading my android version

@KishoreKoushik
Copy link

/home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:123: error: cannot find symbol
[cordova] if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
[cordova] ^
[cordova] symbol: variable R
[cordova] location: class VERSION_CODES
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: variable Type
[cordova] location: class WindowInsets
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: method getInsetsController()
[cordova] location: class Window
[cordova] 3 errors
[cordova]
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:compileDebugJavaWithJavac'.
[cordova] > Compilation failed; see the compiler error output for details.
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 56s
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/gradlew: Command failed with exit code 1 Error output:
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:123: error: cannot find symbol
[cordova] if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
[cordova] ^
[cordova] symbol: variable R
[cordova] location: class VERSION_CODES
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: variable Type
[cordova] location: class WindowInsets
[cordova] /home/fouzo/Desktop/SERVER/FOUZO/exam/mobile/platforms/android/app/src/main/java/com/moust/cordova/videoplayer/VideoPlayer.java:124: error: cannot find symbol
[cordova] dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
[cordova] ^
[cordova] symbol: method getInsetsController()
[cordova] location: class Window
[cordova] 3 errors
[cordova]
[cordova] FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ':app:compileDebugJavaWithJavac'.
[cordova] > Compilation failed; see the compiler error output for details.
[cordova]
[cordova] * Try:
[cordova] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[cordova]
[cordova] * Get more help at https://help.gradle.org
[cordova]
[cordova] BUILD FAILED in 56s
[ERROR] An error occurred while running subprocess cordova.

    cordova build android --device exited with exit code 1.

I solved by upgrading my android version

Updated to which version ?

@wgrientidev
Copy link

Hi there.

You should go to variables.gradle and update 'compileSdkVersion' to '30'.
This is the Version Code R for Android SDK.

@Ricardo385
Copy link

For those who still having the error, you need to go to Project folder -> platforms -> android -> build.gradle and then change defaultCompileSdkVersion to 30 instead 29. That resolved the error for me.

@ryansyrl
Copy link

my compileSDKVersion is already 30 but still having the same error.. is any other way to fix this?

@TBthegr81
Copy link

If ya dont wanna up the android version ya can also just install the previous commit:
cordova plugin add https://github.com/moust/cordova-plugin-videoplayer.git#5c83c858ed159d68cce1bf54e31d6caf7e145fbf

In npm install (or Cordova plugin add) ya can specify a commit by adding the hashtag at the end.
Here I specifiy the (at the time of writing) second to latest commit from 2018 an it compiled fine for me.

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

8 participants