Code Monkey home page Code Monkey logo

Comments (10)

cmackay avatar cmackay commented on June 12, 2024

Hi @writeosahon, This details about the change are in #44

Do you get a specific error message? When I was testing the changes in the emulator I had to add the Google Repository and Google Support from the extras section within the Android SDK Manager. Maybe you are seeing a similar issue? Let me know if that is what you are getting for an error.

Thanks,

-Craig

from google-analytics-plugin.

writeosahon avatar writeosahon commented on June 12, 2024

Hello Craig.
Unfortunately Intel XDK didn't give any details just that it failed to install your plugin.
No detailed error message or log was given.
The additions you spoke about, were you able to bundle them with the plugin?

Osahon Okungbowa
Sent from my Windows Phone

-----Original Message-----
From: "Craig MacKay" [email protected]
Sent: ‎31/‎08/‎2015 02:43 AM
To: "cmackay/google-analytics-plugin" [email protected]
Cc: "Osahon Okungbowa" [email protected]
Subject: Re: [google-analytics-plugin] App Build failing since last update(#45)

Hi @writeosahon, This details about the change are in #44
Do you get a specific error message? When I was testing the changes in the emulator I had to add the Google Repository and Google Support from the extras section within the Android SDK Manager. Maybe you are seeing a similar issue? Let me know if that is what you are getting for an error.
Thanks,
-Craig

Reply to this email directly or view it on GitHub.

from google-analytics-plugin.

writeosahon avatar writeosahon commented on June 12, 2024

Hello @cmackay . After reading #44 I am beginning to consider some possible reasons for this new build failure.
1st, what is the Minimum Android SDK supported by the new framework used in place of Google Play Services. Currently, my app supports sdk 12+ (i.e. 12 - 22).

2nd, what Cordova CLI Version are you using to build your work. Currently I use Version 4.1.2. Maybe you are using a higher CLI version (i.e. 4.2+ / 5.1.1). Please read https://software.intel.com/en-us/forums/topic/564234 for some more info on this.

Hope this helps.
Thanks for all the work on this plugin.

from google-analytics-plugin.

cmackay avatar cmackay commented on June 12, 2024

I am not sure what the min android sdk supported by the new framework is.

As for the cordova CLI version I am running, it is 5.2.0. Not really sure what the issue is that you are having. It might be good to see if there is any way you can get more info on the problem you have. Is there any sort of debug logging you can enable. Having some error details would help in troubleshooting this.

I am sorry I can not provide more help with your question. If I have time I can try to get the intel xdk and see if I can reproduce it. I am not sure when I will be able to dig into this in more detail so until then I recommend you use the 0.1.14 version. Please let me know if you can get any error details.

Thanks,

-Craig

from google-analytics-plugin.

petarov avatar petarov commented on June 12, 2024

The minimum required android sdk version seems to be Android 2.3 (API level 9). As for Cordova CLI, I think it probably isn't an issue, because both the framework tag and Gradle build system are available since v4.0.0.

I believe the problem is just as @cmackay already described above:

I had to add the Google Repository and Google Support from the extras section within the Android SDK Manager

@writeosahon Have you already tried this?

from google-analytics-plugin.

cmackay avatar cmackay commented on June 12, 2024

Hi @writeosahon, I have done some more testing including trying out the Intel XDK. I was able to deploy a test app using the latest plugin in the XDK without any error. The emulation mode that I had seen didn't seem to run native plugins though. I did however install a clean instance of the android sdk, with a new test app using the latest plugin. Like before and as @petarov mentioned, two additional packages are required to use the native analytics services, "Android Support Repository" and "Google Repository". After adding the packages and deploying a test app, I was able to see analytics views registering with the analytics real time view. Hopefully adding these packages will resolve your issue. Attached is a screenshot of the required emulator packages. Let me know how it works out.

packages

from google-analytics-plugin.

writeosahon avatar writeosahon commented on June 12, 2024

@cmackay @petarov Thanks for responding.
Thanks so much for the screenshots and detailed explanations. Let me explain a little of my development cycle: I do all my development using javascript and cordova plugins. I do not have any Andriod SDK installed on my system. When I need to build my app, I build it in the cloud (e.g. IntelXDK Build or PhoneGap Build).
Now, for someone like me that builds apps in the cloud and doesn't use the Android SDK, How do I include the required Android libraries?
Here is a suggestion on how to ensure the new version of the plugin is cloud-friendly (i.e. works with Phonegap Build, IntelXDK Build and Telerik AppBuilder). Please, include/package the Android Support Repository & Google Repository jar files directly into your plugin. That is, place a local copy of the jar files in a location that your plugin references. See these links http://stackoverflow.com/questions/25438160/how-do-i-properly-include-an-external-jar-file-for-a-cordova-plugin ; http://stackoverflow.com/questions/31341904/how-to-include-jar-files-in-phonegap-android-application ; http://stackoverflow.com/questions/31147128/using-jar-file-with-phonegap-cordova-plugin . With this, the required files will be incorporated into the plugin and your plugin will work well with Cordova Cloud Build Services.
Hope these details help you to ensure the plugin work well with Cloud-Build Services.

Looking forward to using the latest version of your plugin in my updated apps.
Thanks for taking out time to respond and address this issue.
Please let me know how you progress.

from google-analytics-plugin.

cmackay avatar cmackay commented on June 12, 2024

This is a plugin for cordova and phonegap builds and it follows the recommend approaches for including google play services. The approach of not including the common platform related dependencies is by design and the best practice. Otherwise many apps would include all these standard dependencies like google play services. I appreciate your suggestions but I will not be importing the dependency jars into the build. At one point this project had the native dependencies and when the native analytics was moved into google play services they were removed.

When I created an app to test out the build, I do the following:

cordova create analytics-test
cd analytics-test
cordova platform add android
cordova plugin add com.cmackay.plugins.googleanalytics
// edit the www/js/index.js to actually use the plugin (register tracking code/ send an analytics request)
cordova run android

I also then was able to open this project in the XDX and hit build on it and it sent me an email saying the cloud build was successful. I would like it to work with all cloud build services but it is really the responsibility of the clould build providers that support cordova to ensure that cordova dependencies are imported properly. As far as I know everything is working fine on Intel XDX since I have not seen any errors in my testing.

If you can provide more details on what is not working, I may look into this in more but for now I am closing this since everything appears to be working properly. I appreciate the information you have provided but I am not able to reproduce any error.

Thanks,

-Craig

from google-analytics-plugin.

petarov avatar petarov commented on June 12, 2024

Just to add. I believe PhoneGap builds (at least older versions) may have some general error working with the framework tag. A similar issue, reported here, seems to exist at the admob plugin side.

@writeosahon I don't have experience with PG, but maybe it is due to an older PG build version and maybe it is fixed with PG Cordova Build 5.1.1 already. You should check with the PG guys for more info on this, as it is in their domain of responsibility as @cmackay noted.

from google-analytics-plugin.

writeosahon avatar writeosahon commented on June 12, 2024

@petarov @cmackay Thanks for the detailed links and explanations. I have been away, hence the late response.
You are absolutely right. The Intel XDK has a problem with resolving gradle builds with libraries/resources from Google. Right now, XDK checks the maven central repo when trying to resolve resources. Unfortunately, Google does not house its libraries in any of those repos.
I'll log an issue with the XDK folks on Monday, this needs to be addressed since the framework tag is the recommended way to create plugins.
I'll keep you updated once the issue is resolved. I'm sure other users would like to know how this can be solved.

Thanks for everything.
Enjoy the weekend

from google-analytics-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.