Help, please. I got errors building my project for Android platform.
See original GitHub issueIt failed to compile.
I have:
- Windows 10 x64
- JDK 1.8.0_201 x64
I got this log of errors. Is ‘final’ keyword even required to build a project? Can anyone help me?
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
C:\project\src\ionic\platforms\android\app\src\main\java\admob\plugin\ads\BannerAd.java:35: error: local variable action is accessed from within inner class; needs to be declared final
BannerAd bannerAd = (BannerAd) action.getAd();
^
C:\project\src\ionic\platforms\android\app\src\main\java\admob\plugin\ads\BannerAd.java:38: error: local variable action is accessed from within inner class; needs to be declared final
action.optId(),
^
C:\project\src\ionic\platforms\android\app\src\main\java\admob\plugin\ads\BannerAd.java:39: error: local variable action is accessed from within inner class; needs to be declared final
action.getAdUnitID(),
^
C:\project\src\ionic\platforms\android\app\src\main\java\admob\plugin\ads\BannerAd.java:40: error: local variable action is accessed from within inner class; needs to be declared final
action.getAdSize(),
^
C:\project\src\ionic\platforms\android\app\src\main\java\admob\plugin\ads\BannerAd.java:41: error: local variable action is accessed from within inner class; needs to be declared final
"top".equals(action.optPosition()) ? Gravity.TOP : Gravity.BOTTOM
^
C:\project\src\ionic\platforms\android\app\src\main\java\admob\plugin\ads\BannerAd.java:44: error: local variable action is accessed from within inner class; needs to be declared final
bannerAd.show(action.buildAdRequest());
^
C:\project\src\ionic\platforms\android\app\src\main\java\admob\plugin\ads\BannerAd.java:47: error: local variable callbackContext is accessed from within inner class; needs to be declared final
callbackContext.sendPluginResult(result);
^
C:\project\src\ionic\platforms\android\app\src\main\java\admob\plugin\ads\BannerAd.java:58: error: local variable action is accessed from within inner class; needs to be declared final
BannerAd bannerAd = (BannerAd) action.getAd();
^
C:\project\src\ionic\platforms\android\app\src\main\java\admob\plugin\ads\BannerAd.java:64: error: local variable callbackContext is accessed from within inner class; needs to be declared final
callbackContext.sendPluginResult(result);
^
:app:compileDebugJavaWithJavac FAILED
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 errors
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Known issues with Android Studio and Android Gradle Plugin
Compilation issue in Kotlin multiplatform projects. Compilation errors may arise in Kotlin MPP code due to missing symbols. Upgrading your Kotlin plugin to ......
Read more >Showing error when create a new Project in Android Studio
1 Answer 1 ... You are using the support libraries v23,you have to compile your project with API23. In your build.gradle change the...
Read more >Android Studio:How to find errors in code after compile
If not, please redirect me to the right place.I have just started trying... ... When I compile my project, I get the output:...
Read more >Troubleshooting Android Issues | Capacitor Documentation
If you have installed a new Plugin from npm and are unable to use or see the plugins in your Android build, try...
Read more >There are a lot of unwanted messy appcompat_v7_* project ...
so please help me. i removed the appcompat_7 project from my project ... PS, root cause of the later issue is android 5.0...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any progress? We need help hurry! Thanks
action is a function param, not a local variable, is it a bug?
Hey @andrey3diq
Thank you for the answer! But unfortunately I have exactly that 7.1.4 version of android platform.
Some more environment info