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

Google Analytics robopods 1.14 broken when using GGLContext #107

Open
keesvandieren opened this issue Mar 11, 2016 · 7 comments
Open

Google Analytics robopods 1.14 broken when using GGLContext #107

keesvandieren opened this issue Mar 11, 2016 · 7 comments

Comments

@keesvandieren
Copy link

Hi,

We try to upgrade our existing app (working fine in 1.13) to 1.14.

It fails with the following exception:

Execute: GGLContext.getSharedInstance().configure()
java.lang.ExceptionInInitializerError
at org.robovm.samples.robopods.google.analytics.ios.GoogleAnalyticsApp.didFinishLaunching(GoogleAnalyticsApp.java:40)
at org.robovm.samples.robopods.google.analytics.ios.GoogleAnalyticsApp.$cb$application$didFinishLaunchingWithOptions$(GoogleAnalyticsApp.java)
at org.robovm.apple.uikit.UIApplication.main(Native Method)
at org.robovm.apple.uikit.UIApplication.main(UIApplication.java:413)
at org.robovm.samples.robopods.google.analytics.ios.GoogleAnalyticsApp.main(GoogleAnalyticsApp.java:59)
Caused by: org.robovm.objc.ObjCClassNotFoundException: GGLContext
at org.robovm.objc.ObjCClass.getByType(ObjCClass.java:251)
at org.robovm.pods.google.GGLContext.(GGLContext.java:43)

The installation guide (here: https://github.com/robovm/robovm-robopods/tree/master/google-analytics/ios ) mentions this code block:

try {
    GGLContext.getSharedInstance().configure();
} catch (NSErrorException e) {
    System.err.println("Error configuring the Google context: " + e.getError());
}

Adding that block, crashes the robovm sample for Google Analytics.

It is demonstrated in this commit:

squins/robovm-samples@045953d

Maybe native classes for https://github.com/robovm/robovm-robopods/tree/master/google-apis are missing?

@kizinfo
Copy link

kizinfo commented Apr 4, 2016

certainly seems like something is missing. can still use GA without the configuration file
GAI.getSharedInstance().getTracker("UA-XXXXXXX-X");
after first time it sticks as the default tracker.

@krasanen
Copy link

Facing the same issue, cannot get google-mobile-adds-ios to work anymore. It fails at run time to "org.robovm.objc.ObjCClassNotFoundException: GGLContext" when "GGLContextMobileAds.getSharedInstance().configure();" is called. Also fails to missing classes when trying to configure adds with separate add instances instead of "GoogleService-Info.plist" configuration file. It seems that natives are missing for some reason? Is there a way to use them without GGLContext until this is solved?

@julienvillegas
Copy link

I have the same issue (with version 1.14)

java.lang.ExceptionInInitializerError
    at org.robovm.pods.google.GGLContextMobileAds.getSharedInstance(GGLContextMobileAds.java:33)
Caused by: org.robovm.objc.ObjCClassNotFoundException: GGLContext
    at org.robovm.objc.ObjCClass.getByType(ObjCClass.java:251)
    at org.robovm.pods.google.GGLContext.<clinit>(GGLContext.java:43)
    ... 7 more

Apparently this is also raised on RoboVM group since March 3rd : https://groups.google.com/forum/#!topic/robovm/V_ity6VXJIo

@krasanen
Copy link

Found a workaround to get classes found. Added libAdIdAccess.a, libGGLCore.a and libGoogleAnalyticsServices.a to ios/libs.

@julienvillegas
Copy link

Sounds good. I cannot find those files. Where can I find them?

@keesvandieren
Copy link
Author

@julienvillegas
Copy link

Ok,
I god rid of the issue, was using GGLContext.getSharedInstance().configure(); to adMobs, but instead of of loading the add ID from the google configuration file through:

GGLContext.getSharedInstance().configure();
interstitial = new GADInterstitial(GGLContextMobileAds.getSharedInstance().getAdUnitIDForInterstitialTest());

I simply passed the adMob ID manually as such:

interstitial = new GADInterstitial("ca-app-pub-xxxx/xxxx");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants