You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/03/22 16:07:05 UTC

[GitHub] [cordova-android] rashnk opened a new issue #932: Cordova android build failed with error AdMob.java:11: error: cannot find symbol import com.google.android.gms.common.GoogleApiAvailability;

rashnk opened a new issue #932: Cordova android build failed with error AdMob.java:11: error: cannot find symbol import com.google.android.gms.common.GoogleApiAvailability;
URL: https://github.com/apache/cordova-android/issues/932
 
 
   # Bug Report
   
   ## Problem
   I have been using cordova-plugin-admob-free for last 2 years without any issues. But after creating new project with the latest cordova application, Build failed when I use cordova-plugin-admob-free
   
   ### What is expected to happen?
   cordova build android command should  build and generate apk successfully without any error
   
   
   ### What does actually happen?
   cordova build android returns error as below
   ```
   platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:11: error: cannot find symbol
   import com.google.android.gms.common.GoogleApiAvailability;
                                       ^
     symbol:   class GoogleApiAvailability
     location: package com.google.android.gms.common
   > Task :app:compileDebugJavaWithJavac FAILED
   D:\test\MyApp2\platforms\android\app\src\main\java\name\ratson\cordova\admob\AdMob.java:53: error: cannot find symbol
           isGpsAvailable = (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(cordova.getActivity()) == ConnectionResult.SUCCESS);
   ```
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   com.google.android.gms.common.GoogleApiAvailability 
   com.google.android this library not exist in the latest android
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   Steps to reproduce
   ```
   cordova create MyApp
   cd MyApp
   cordova platform add android
   cordova build android
   // BUILD SUCCESSFULL
   cordova plugin add cordova-plugin-admob-free --save --variable ADMOB_APP_ID="<YOUR_ANDROID_ADMOB_APP_ID_AS_FOUND_IN_ADMOB>"
   cordova build android
   ```
    // BUILD FAILED 
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   Windows 8.1
   Android studio 3.6.1
   acer aspire 5742
   
   
   ### Version information
   cordova -v
   9.0.0 (cordova-lib@9.0.1)
   package.json
   ```
   "dependencies": {
       "cordova-admob-sdk": "0.24.1",
       "cordova-android": "^8.1.0",
       "cordova-plugin-admob-free": "0.27.0",
       "cordova-promise-polyfill": "0.0.2"
     },
   
   
   
   ```
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ ] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [ ] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-android] rashnk commented on issue #932: Cordova android build failed with error AdMob.java:11: error: cannot find symbol import com.google.android.gms.common.GoogleApiAvailability;

Posted by GitBox <gi...@apache.org>.
rashnk commented on issue #932: Cordova android build failed with error AdMob.java:11: error: cannot find symbol import com.google.android.gms.common.GoogleApiAvailability;
URL: https://github.com/apache/cordova-android/issues/932#issuecomment-602239960
 
 
   I have used the plugin https://admob-plus.github.io/ from the same author and it works without any problem

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-android] rashnk closed issue #932: Cordova android build failed with error AdMob.java:11: error: cannot find symbol import com.google.android.gms.common.GoogleApiAvailability;

Posted by GitBox <gi...@apache.org>.
rashnk closed issue #932: Cordova android build failed with error AdMob.java:11: error: cannot find symbol import com.google.android.gms.common.GoogleApiAvailability;
URL: https://github.com/apache/cordova-android/issues/932
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org