appfeel / admob-google-cordova

AdMob ads Cordova/Phonegap/Intel XDK plugin for Android iPhone with latest SDK's
MIT License
133 stars 127 forks source link

package com.google.android.gms.ads.purchase does not exist in build.phonegap.com #100

Open sivapictuscode opened 5 years ago

sivapictuscode commented 5 years ago

After install phonegap-admob not able to build apk from build.phonegap.com alwasy getting below error:

Build Date: 2018-08-02 14:01:40 +0000

PLUGIN OUTPUT

Fetching plugin "cordova-plugin-ios-camera-permissions@1.0.3" via npm Installing "cordova-plugin-ios-camera-permissions" at "1.0.3" for android Fetching plugin "cordova-plugin-battery-status@~1.1.1" via npm Installing "cordova-plugin-battery-status" at "1.1.2" for android Fetching plugin "cordova-plugin-camera@~2.1.1" via npm Installing "cordova-plugin-camera" at "2.1.1" for android Fetching plugin "cordova-plugin-media-capture@~1.2.0" via npm Installing "cordova-plugin-media-capture" at "1.2.0" for android Fetching plugin "cordova-plugin-file@^4.0.0" via npm Installing "cordova-plugin-file" at "4.3.3" for android Fetching plugin "cordova-plugin-compat@^1.0.0" via npm Installing "cordova-plugin-compat" at "1.2.0" for android

The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

  "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

to config.xml in order for the application to find previously stored files. Fetching plugin "cordova-plugin-console@~1.0.2" via npm Installing "cordova-plugin-console" at "1.0.7" for android Fetching plugin "cordova-plugin-contacts@~2.0.1" via npm Installing "cordova-plugin-contacts" at "2.0.1" for android Fetching plugin "cordova-plugin-device@~1.1.1" via npm Installing "cordova-plugin-device" at "1.1.7" for android Fetching plugin "cordova-plugin-device-motion@~1.2.0" via npm Installing "cordova-plugin-device-motion" at "1.2.5" for android Fetching plugin "cordova-plugin-device-orientation@~1.0.2" via npm Installing "cordova-plugin-device-orientation" at "1.0.7" for android Fetching plugin "cordova-plugin-dialogs@~1.2.0" via npm Installing "cordova-plugin-dialogs" at "1.2.1" for android Plugin "cordova-plugin-file" already installed on android. Making it top-level. Fetching plugin "cordova-plugin-file-transfer@~1.5.0" via npm Installing "cordova-plugin-file-transfer" at "1.5.1" for android Plugin dependency "cordova-plugin-file@4.3.3" already fetched, using that version. Dependent plugin "cordova-plugin-file" already installed on android. Fetching plugin "cordova-plugin-geolocation@~2.1.0" via npm Installing "cordova-plugin-geolocation" at "2.1.0" for android Fetching plugin "cordova-plugin-globalization@~1.0.3" via npm Installing "cordova-plugin-globalization" at "1.0.9" for android Fetching plugin "cordova-plugin-inappbrowser@~1.3.0" via npm Installing "cordova-plugin-inappbrowser" at "1.3.0" for android Fetching plugin "cordova-plugin-media@~2.2.0" via npm Installing "cordova-plugin-media" at "2.2.0" for android Plugin dependency "cordova-plugin-file@4.3.3" already fetched, using that version. Dependent plugin "cordova-plugin-file" already installed on android. Fetching plugin "cordova-plugin-network-information@~1.2.0" via npm Installing "cordova-plugin-network-information" at "1.2.1" for android Fetching plugin "cordova-plugin-splashscreen@~3.2.1" via npm Installing "cordova-plugin-splashscreen" at "3.2.2" for android Fetching plugin "cordova-plugin-statusbar@~2.1.2" via npm Installing "cordova-plugin-statusbar" at "2.1.3" for android Fetching plugin "cordova-plugin-vibration@~2.1.0" via npm Installing "cordova-plugin-vibration" at "2.1.6" for android Fetching plugin "cordova-admob@~4.1.16" via npm Installing "cordova-admob" at "4.1.16" for android Fetching plugin "cordova-connectivity-monitor" via npm Installing "cordova-connectivity-monitor" at "1.2.2" for android Subproject Path: CordovaLib

PROJECT PROPERTIES

This file is automatically generated by Android Tools.

Do not modify this file -- YOUR CHANGES WILL BE ERASED!

#

This file must be checked in Version Control Systems.

#

To customize properties used by the Ant build system edit

"ant.properties", and override values to adapt the script to your

project structure.

#

To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

Project target.

target=android-25 android.library.reference.1=CordovaLib cordova.system.library.1=com.google.android.gms:play-services-ads:+

COMPILE OUTPUT

Subproject Path: CordovaLib Running command: /project/gradlew cdvBuildDebug -b /project/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true 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_f1ewie72x6kt0uf18k1ob06z5.run(/project/build.gradle:137) The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0. Incremental java compilation is an incubating feature. The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead. The ProjectDependency.getProjectConfiguration() method has been deprecated and is scheduled to be removed in Gradle 4.0. ModuleDependency.getConfiguration() has been deprecated and is scheduled to be removed in Gradle 4.0. Use ModuleDependency.getTargetConfiguration() instead. :preBuild UP-TO-DATE :preDebugBuild UP-TO-DATE :checkDebugManifest :preReleaseBuild UP-TO-DATE :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:checkDebugManifest :CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugAidl :CordovaLib:compileDebugNdk UP-TO-DATE :CordovaLib:compileLint :CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugShaders :CordovaLib:compileDebugShaders :CordovaLib:generateDebugAssets :CordovaLib:mergeDebugAssets :CordovaLib:mergeDebugProguardFiles :CordovaLib:packageDebugRenderscript UP-TO-DATE :CordovaLib:compileDebugRenderscript :CordovaLib:generateDebugResValues :CordovaLib:generateDebugResources :CordovaLib:packageDebugResources :CordovaLib:processDebugManifest :CordovaLib:generateDebugBuildConfig :CordovaLib:processDebugResources :CordovaLib:generateDebugSources :CordovaLib:incrementalDebugJavaCompilationSafeguard :CordovaLib:compileDebugJavaWithJavac :CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForDebug :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug :CordovaLib:mergeDebugJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForDebug :CordovaLib:transformNative_libsWithSyncJniLibsForDebug :CordovaLib:bundleDebug :CordovaLib:preReleaseBuild UP-TO-DATE :CordovaLib:checkReleaseManifest :CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseAidl :CordovaLib:compileReleaseNdk UP-TO-DATE :CordovaLib:copyReleaseLint UP-TO-DATE :CordovaLib:mergeReleaseShaders :CordovaLib:compileReleaseShaders :CordovaLib:generateReleaseAssets :CordovaLib:mergeReleaseAssets :CordovaLib:mergeReleaseProguardFiles :CordovaLib:packageReleaseRenderscript UP-TO-DATE :CordovaLib:compileReleaseRenderscript :CordovaLib:generateReleaseResValues :CordovaLib:generateReleaseResources :CordovaLib:packageReleaseResources :CordovaLib:processReleaseManifest :CordovaLib:generateReleaseBuildConfig :CordovaLib:processReleaseResources :CordovaLib:generateReleaseSources :CordovaLib:incrementalReleaseJavaCompilationSafeguard :CordovaLib:compileReleaseJavaWithJavac :CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForRelease :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease :CordovaLib:mergeReleaseJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForRelease :CordovaLib:transformNative_libsWithSyncJniLibsForRelease :CordovaLib:bundleRelease :prepareComAndroidSupportSupportCompat2520Library :prepareComAndroidSupportSupportCoreUi2520Library :prepareComAndroidSupportSupportCoreUtils2520Library :prepareComAndroidSupportSupportFragment2520Library :prepareComAndroidSupportSupportMediaCompat2520Library :prepareComAndroidSupportSupportV42520Library :prepareComGoogleAndroidGmsPlayServicesAds1104Library :prepareComGoogleAndroidGmsPlayServicesAdsLite1104Library :prepareComGoogleAndroidGmsPlayServicesBase1104Library :prepareComGoogleAndroidGmsPlayServicesBasement1104Library :prepareComGoogleAndroidGmsPlayServicesClearcut1104Library :prepareComGoogleAndroidGmsPlayServicesGass1104Library :prepareComGoogleAndroidGmsPlayServicesSafetynet1104Library :prepareComGoogleAndroidGmsPlayServicesTasks1104Library :prepareProjectCordovaLibUnspecifiedDebugLibrary :prepareDebugDependencies :compileDebugAidl :compileDebugRenderscript :generateDebugBuildConfig :generateDebugResValues :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources :generateDebugSources :incrementalDebugJavaCompilationSafeguard :compileDebugJavaWithJavac :compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). /project/src/com/appfeel/cordova/admob/AdMobAds.java:64: error: package com.google.android.gms.ads.purchase does not exist import com.google.android.gms.ads.purchase.InAppPurchase; ^ /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:33: error: package com.google.android.gms.ads.purchase does not exist import com.google.android.gms.ads.purchase.InAppPurchase; ^ /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:34: error: package com.google.android.gms.ads.purchase does not exist import com.google.android.gms.ads.purchase.InAppPurchaseListener; ^ /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:37: error: cannot find symbol public class AdMobAdsAppPurchaseListener implements InAppPurchaseListener { ^ symbol: class InAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:40: error: cannot find symbol private SparseArray purchases = new SparseArray(); ^ symbol: class InAppPurchase location: class AdMobAdsAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:47: error: cannot find symbol synchronized public void onInAppPurchaseRequested(final InAppPurchase inAppPurchase) { ^ symbol: class InAppPurchase location: class AdMobAdsAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:60: error: cannot find symbol public InAppPurchase getPurchase(int purchaseId) { ^ symbol: class InAppPurchase location: class AdMobAdsAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAds.java:626: error: cannot find symbol interstitialAd.setInAppPurchaseListener(inAppPurchaseListener); ^ symbol: method setInAppPurchaseListener(AdMobAdsAppPurchaseListener) location: variable interstitialAd of type InterstitialAd /project/src/com/appfeel/cordova/admob/AdMobAds.java:705: error: cannot find symbol final InAppPurchase purchase = inAppPurchaseListener.getPurchase(purchaseId); ^ symbol: class InAppPurchase location: class AdMobAds /project/src/com/appfeel/cordova/admob/AdMobAds.java:728: error: cannot find symbol final InAppPurchase purchase = inAppPurchaseListener.getPurchase(purchaseId); ^ symbol: class InAppPurchase location: class AdMobAds /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:40: error: cannot find symbol private SparseArray purchases = new SparseArray(); ^ symbol: class InAppPurchase location: class AdMobAdsAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:46: 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: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 12 errors :compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 3.371 secs Command finished with error code 1: /project/gradlew cdvBuildDebug,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true Error: /project/gradlew: Command failed with exit code 1 Error output: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. /project/src/com/appfeel/cordova/admob/AdMobAds.java:64: error: package com.google.android.gms.ads.purchase does not exist import com.google.android.gms.ads.purchase.InAppPurchase; ^ /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:33: error: package com.google.android.gms.ads.purchase does not exist import com.google.android.gms.ads.purchase.InAppPurchase; ^ /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:34: error: package com.google.android.gms.ads.purchase does not exist import com.google.android.gms.ads.purchase.InAppPurchaseListener; ^ /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:37: error: cannot find symbol public class AdMobAdsAppPurchaseListener implements InAppPurchaseListener { ^ symbol: class InAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:40: error: cannot find symbol private SparseArray purchases = new SparseArray(); ^ symbol: class InAppPurchase location: class AdMobAdsAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:47: error: cannot find symbol synchronized public void onInAppPurchaseRequested(final InAppPurchase inAppPurchase) { ^ symbol: class InAppPurchase location: class AdMobAdsAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:60: error: cannot find symbol public InAppPurchase getPurchase(int purchaseId) { ^ symbol: class InAppPurchase location: class AdMobAdsAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAds.java:626: error: cannot find symbol interstitialAd.setInAppPurchaseListener(inAppPurchaseListener); ^ symbol: method setInAppPurchaseListener(AdMobAdsAppPurchaseListener) location: variable interstitialAd of type InterstitialAd /project/src/com/appfeel/cordova/admob/AdMobAds.java:705: error: cannot find symbol final InAppPurchase purchase = inAppPurchaseListener.getPurchase(purchaseId); ^ symbol: class InAppPurchase location: class AdMobAds /project/src/com/appfeel/cordova/admob/AdMobAds.java:728: error: cannot find symbol final InAppPurchase purchase = inAppPurchaseListener.getPurchase(purchaseId); ^ symbol: class InAppPurchase location: class AdMobAds /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:40: error: cannot find symbol private SparseArray purchases = new SparseArray(); ^ symbol: class InAppPurchase location: class AdMobAdsAppPurchaseListener /project/src/com/appfeel/cordova/admob/AdMobAdsAppPurchaseListener.java:46: 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: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 12 errors

FAILURE: Build failed with an exception.

Brianfit commented 5 years ago

I believe the solution outlined here is what you need. Worked for me.