Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getOpenSourceSoftwareLicenseInfo not found in Google Play services #1646

Closed
pjorquera opened this issue Aug 16, 2017 · 32 comments
Closed

getOpenSourceSoftwareLicenseInfo not found in Google Play services #1646

pjorquera opened this issue Aug 16, 2017 · 32 comments
Labels

Comments

@pjorquera
Copy link

pjorquera commented Aug 16, 2017

I'm submitting a ...
[ ] question
[x] any problem or bug report
[ ] feature request

plugin version: (check one with "x")
[ ] 1.4.x
[x] 2.0.0-beta2

Git rev: 785086e

cordova information: (run $> cordova plugin list)

cordova-fabric-plugin 1.1.9 "cordova-fabric-plugin"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-camera-preview 0.9.0 "cordova-plugin-camera-preview"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-opener2 2.0.19 "File Opener2"
cordova-plugin-filechooser 1.0.1 "File Chooser"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin"
cordova-plugin-googlemaps 2.0.0-beta2-20170727-1500 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.4-dev "Cordova WKWebView Engine"
ionic-plugin-keyboard 2.2.1 "Keyboard"
urbanairship-cordova 6.8.0 "Urban Airship"

Current behavior:
Ionic 3 Mobile App doesn't builds because getOpenSourceSoftwareLicenseInfo was not found in Google Play services.

Expected behavior:
App builds successfully.

Related code, data or error log (please format your code or data):

BUILD FAILED
        
        Total time: 1 mins 28.368 secs
        Error: /Users/pjorquera/work/mms/myGarage/platforms/android/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.
        /Users/pjorquera/work/mms/myGarage/platforms/android/src/plugin/google/maps/AsyncLicenseInfo.java:22: error: 
        cannot find symbol
             String licenseInfo = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(mActivity);
                                                        ^
           symbol:   method getOpenSourceSoftwareLicenseInfo(Activity)
           location: class GooglePlayServicesUtil
        /Users/pjorquera/work/mms/myGarage/platforms/android/src/plugin/google/maps/Environment.java:124: error: cannot 
        find symbol
             String msg = GoogleApiAvailability.getInstance().getOpenSourceSoftwareLicenseInfo(cordova.getActivity());
                                                             ^
           symbol:   method getOpenSourceSoftwareLicenseInfo(Activity)
           location: class GoogleApiAvailability
        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.
        2 errors
        
        FAILURE: Build failed with an exception.

Google has deprecated (and removed) the symbol getOpenSourceSoftwareLicenseInfo(Context context) from Google Play services as can be seen here: https://developers.google.com/android/reference/com/google/android/gms/common/GooglePlayServicesUtil.html#getOpenSourceSoftwareLicenseInfo(android.content.Context)

@wf9a5m75
Copy link
Member

Thank you for letting me know. I will catch up later.

@gercinojr
Copy link

I have the same issue. @wf9a5m75 Do you know any temporary solution?

@pjorquera
Copy link
Author

pjorquera commented Aug 16, 2017

@gercinojr, you can fork the repo and remove / disable the deprecated methods in AsyncLicenseInfo.java and Environment.java until @wf9a5m75 releases a new version of the plugin (will apreciate if you also publish your changes as PR).

@wf9a5m75
Copy link
Member

I'm contacting to Google Maps team in order to confirm that the license text is still required or not in iOS.

ghost pushed a commit that referenced this issue Aug 16, 2017
Because the getOpenSourceSoftwareLicenseInfo() was removed from Android
@wf9a5m75
Copy link
Member

Okay, I updated the plugin code.

Since iOS still has the method, and it is not even deprecated, I keep the method.
But in Android, the method returns undefined.

@Anopetia
Copy link

Hi,

Can we download the fix?

Thank you.

@wf9a5m75
Copy link
Member

You just need to reinstall the plugin.

@Anopetia
Copy link

Is that working if i reinstall from npm with the current branch, because I have the same problem for 1.4.3?

@Anopetia
Copy link

Anopetia commented Aug 16, 2017

Here is the compile error (Im using npm with version 1.4.3), I just reinstalled the plugin)

Warning: /mnt/storage/builds/UtCIJfUEzu89Xb8riG/app/src/plugin/google/maps/GoogleMaps.java:717: error: cannot find symbol String msg = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(activity); ^ symbol: method getOpenSourceSoftwareLicenseInfo(Activity) location: class GooglePlayServicesUtil Warning: /mnt/storage/builds/UtCIJfUEzu89Xb8riG/app/src/plugin/google/maps/AsyncLicenseInfo.java:22: error: cannot find symbol Warning: String licenseInfo = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(mActivity); ^ symbol: method getOpenSourceSoftwareLicenseInfo(Activity) location: class GooglePlayServicesUtil Warning: Note: Some input files use or override a deprecated API.

@pjorquera
Copy link
Author

pjorquera commented Aug 16, 2017

@wf9a5m75, there's some typo with your last commit: literal 0 in the file Environment.java:

3c4eadd#diff-b0586d70c9c30dd91967b4d78a5a7cd9R40

Output log:

/home/travis/build/okode/mms/myGarage/platforms/android/src/plugin/google/maps/Environment.java:40: error: not a statement
                   }0
                    ^
        /home/travis/build/okode/mms/myGarage/platforms/android/src/plugin/google/maps/Environment.java:40: error: ';' expected
                   }0
                     ^
        2 errors
        :compileReleaseJavaWithJavac FAILED
        
        FAILURE: Build failed with an exception.

@wf9a5m75
Copy link
Member

Oops. Fixed.

@Anopetia
Copy link

@wf9a5m75 can I use the 1.4.3 version from npm and compile ?

@wf9a5m75
Copy link
Member

V1.4.3 is out of dated. Please use the v2.0-beta

@Anopetia
Copy link

I tried to but did not find a way to download it .

Is that on npm or ? Can you please provide a link ?

Thabk you , and thanks a lot for your reactivity.

@wf9a5m75
Copy link
Member

Why do you want to download?

@Anopetia
Copy link

I use visual studio and build in cloud I need the zip file as I have it for npm . Is that something I miss?

@wf9a5m75
Copy link
Member

I'm not Windows user, but it seems you can specify the github url.
(In this picture, select the git tag)

@Anopetia
Copy link

Thats exactly what I want the git url
Of the last beta version, where can I find it ?

@wf9a5m75
Copy link
Member

@wf9a5m75
Copy link
Member

Just specify https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps

@Anopetia
Copy link

Perfect , and this branch is stable enough for a large public production app?

@wf9a5m75
Copy link
Member

Mostly stable, but still updates frequently.

@Anopetia
Copy link

Thank you again , great support mega thumbs up . Have a great day

ghost pushed a commit that referenced this issue Aug 16, 2017
Because the getOpenSourceSoftwareLicenseInfo() was removed from Android
@wf9a5m75
Copy link
Member

v1.4 is also fixed. And I updated the npm.

@pjorquera
Copy link
Author

@wf9a5m75 perfect! Now we could build succesfully with v2 version 👍

@lpsantana
Copy link

Updated my project to 1.4.4 version but in GoogleMaps.java class, the line 1285 references AsyncLicenseInfo, but it was deleted. If the class doesn't exist, what is the reason for this line?

Can't build my project with the 1.4.4 version. Any help?

@wf9a5m75
Copy link
Member

Oh,...

ghost pushed a commit that referenced this issue Aug 17, 2017
Because the getOpenSourceSoftwareLicenseInfo() was removed from Android
@wf9a5m75
Copy link
Member

@lpsantana I updated the code. Please try to reinstall the plugin.
(But I recommend you start moving to the v2.0)

@cwoolum
Copy link

cwoolum commented Aug 18, 2017

Should we pull from master to get this fix or is it at 1.4.4 on npm?

@lpsantana
Copy link

I think this fix are in 1.4.5 version @cwoolum . See changelog for details

But this version was unable to install.

npm ERR! notarget No compatible version found: [email protected]
npm ERR! notarget Valid install targets:
npm ERR! notarget 1.3.4, 1.3.6, 1.3.7, 1.3.9, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4

@cwoolum
Copy link

cwoolum commented Aug 18, 2017

Same here. Had to use master to unblock my build

@wf9a5m75
Copy link
Member

published.

pjorquera pushed a commit to okode/cordova-plugin-googlemaps that referenced this issue Aug 23, 2017
Because the getOpenSourceSoftwareLicenseInfo() was removed from Android
stubbst pushed a commit to stubbst/cordova-plugin-googlemaps that referenced this issue Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants