# Help in building APK with admob-free

**URL:** <https://forum.ionicframework.com/t/help-in-building-apk-with-admob-free/133190>\
**Category:** Ionic Native\
**Created:** [June 20, 2018, 9:30am UTC](https://forum.ionicframework.com/t/help-in-building-apk-with-admob-free/133190 "2018-06-20T09:30:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmed82](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@ahmed82](https://forum.ionicframework.com/u/ahmed82)\
**Post date:** [June 20, 2018, 9:30am UTC](https://forum.ionicframework.com/t/help-in-building-apk-with-admob-free/133190/1 "2018-06-20T09:30:51Z")

</div>

when i add ionic admob free plugin i got this error when building the app

cordova build android  
Android Studio project detected

ANDROID\_HOME=C:\Users\wzcoder\AppData\Local\Android\Sdk  
JAVA\_HOME=C:\Program Files\java\jdk1.8.0\_171  
studio  
Subproject Path: CordovaLib  
Subproject Path: app  
[11:25:11] lint finished in 6.93 s  
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\_3gpxlwkptiz63tes07idci8ff.run(C:\Users\wzcoder\Desktop\admo\platforms\android\app\build.gradle:143)  
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  
:app:compileDebugJavaWithJavac  
C:\Users\wzcoder\Desktop\admo\platforms\android\app\src\main\java\name\ratson\cordova\admob\rewardvideo\RewardVideoListener.java:90: error: method does not override or implement a method from a supertype  
@Override  
^  
Note: Some input files use or override a deprecated API.  
FAILED

Note: Recompile with -Xlint:deprecation for details.  
1 error

27 actionable tasks: 1 executed, 26 up-to-date  
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](https://help.gradle.org)

BUILD FAILED in 7s  
(node:8732) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:  
C:\Users\wzcoder\Desktop\admo\platforms\android\app\src\main\java\name\ratson\cordova\admob\rewardvideo\RewardVideoListener.java:90: 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.  
1 error

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](https://help.gradle.org)

BUILD FAILED in 7s  
at ChildProcess.whenDone (C:\Users\wzcoder\Desktop\admo\platforms\android\cordova\node\_modules\cordova-common\src\superspawn.js:169:23)  
at emitTwo (events.js:126:13)  
at ChildProcess.emit (events.js:214:7)  
at maybeClose (internal/child\_process.js:925:16)  
at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:209:5)  
(node:8732) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)  
(node:8732) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:32pm UTC](https://forum.ionicframework.com/t/help-in-building-apk-with-admob-free/133190/2 "2021-07-19T21:32:02Z")

</div>

Closed on July 19, 2021, 9:32pm UTC


