question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUILD FAILED for Android. Possible conflict with flurry analytics plugin.

See original GitHub issue

Is this a bug report?

Yes? I don’t know… Looks like it is. This is interesting.

Environment

AdMob Plus Environment Info:
    System:
      OS: Windows 7
      CPU: (4) x64 AMD Phenom(tm) II X4 B45 Processor
      Memory: 3.44 GB / 8.00 GB
    Binaries:
      Node: 10.15.1 - C:\node-v10.15.1-x64\node.EXE
      npm: 6.8.0 - C:\node-v10.15.1-x64\npm.CMD
    IDEs:
      Android Studio: Version  3.3.0.0 AI-182.5107.16.33.5264788

cordova: 8.1.2 (cordova-lib@8.1.1)
ionic: 4.10.3
cordova plugins: {
  "cordova-plugin-whitelist": "^1.3.3",
  "cordova-plugin-statusbar": "^2.4.2",
  "cordova-plugin-device": "^2.0.2",
  "cordova-plugin-splashscreen": "^5.0.2",
  "cordova-plugin-ionic-webview": "^3.1.2",
  "cordova-plugin-ionic-keyboard": "^2.1.3",
  "cordova-admob-plus": "0.24.1",
  "cordova-plugin-flurryanalytics": "1.4.6"
}

AndroidManifest.xml: using test APPLICATION_ID

Steps to Reproduce

(Write your steps here:)

  1. ionic start app blank
  2. cd app
  3. ionic cordova platform add android
  4. ionic cordova plugin add cordova-admob-plus
  5. ionic cordova build android --prod
  6. ionic cordova plugin add cordova-plugin-flurryanalytics
  7. ionic cordova build android --prod

Expected Behavior

Project should be build.

Actual Behavior

Project failed to compile. Got this log of errors.

ng run app:ionic-cordova-build:production --platform=android
...
...
cordova build android
Android Studio project detected
ANDROID_HOME=C:\android_sdk
JAVA_HOME=C:\Java
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_7cpd6dc5mab833vrfnhpo98na.run(D:\app\platforms\android\app\build.gradle:149)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:javaPreCompileDebug UP-TO-DATE
D:\app\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();
                                               ^
D:\app\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(),
                        ^
D:\app\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(),
                        ^
D:\app\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(),
                        ^
D:\app\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
                                     ^
D:\app\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());
                              ^
D:\app\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);
                ^
D:\app\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();
                                               ^
D:\app\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);
                ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 errors
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
27 actionable tasks: 1 executed, 26 up-to-date
cmd: Command failed with exit code 1 Error output:
D:\app\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();
                                               ^
D:\app\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(),
                        ^
D:\app\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(),
                        ^
D:\app\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(),
                        ^
D:\app\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
                                     ^
D:\app\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());
                              ^
D:\app\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);
                ^
D:\app\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();
                                               ^
D:\app\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);
                ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 errors

FAILURE: Build failed with an exception.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
[ERROR] An error occurred while running subprocess cordova.

        cordova build android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Hope you’ll look into it. Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
devgenicommented, Mar 14, 2019

@tbergeron Alas. I switched to AdMob Free and never looked back.

https://github.com/ratson/cordova-plugin-admob-free

1reaction
tbergeroncommented, Mar 14, 2019

Anyone? I have the same problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to resolve: com.flurry.android:analytics:10.0.1
I am trying to upgrade flurry analytics(10.0.1) library into our project. But gradle sync fails with the below error. Failed to resolve: com....
Read more >
Unable to instantiate service com.flurry.android.marketing ...
Hello, I have the same problem. I dont use Flurry Messaging and Firebase Messaging , only using Flurry Analytics , Firebase Analytics ,...
Read more >
Build Error #1 - Flurry Plugin - Android 64-bit testing
Getting a [Build Error #1] message when attempting to build with the flurry analytics plugin. If I remove the flurry plugin, ...
Read more >
Crash Analytics for Android - Yahoo Developer Network
Flurry Crash Analytics provides crash, exception and error logs in real time in order to quickly determine the root cause of the issue....
Read more >
Android – .NET Development Addict
So head over to the dashboard and get started creating and supporting awesome cross-platform apps now. Binding Flurry Analytics with Xamarin.Android · August...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found