最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Where To Add the Dependency for Android integration for Mixpanel ? I code with AIDE; for Android with Libgdx for android game de

programmeradmin1浏览0评论

I code with AIDE code editor, and, you can code non game apps for Android, and game apps; difference being when you select your Template to create; you select Mobile game java/libgdx app template for game app, or Java/xml app for non game app. All is good, to create the app, and in the non game app, I can FIND and add to build.gradle, the mixpanel dependency, no problem; have included Mixpanel for my non game app, and it worked fine to send Events to Mixpanel. HOWEVER, for game app, not so straightforward; Game app works with Libgdx, so for android, files are at folder gdx-game-android, and for Libgdx, folder at gdx-game. So, with this setup, MainActivity.java is at gdx-game-android/src, and MyGdxGame.java, is at gdx-game/src folder. Assets, like images, still get placed at gdx-game-android/assets. My game code gets coded into MyGdxGame.java, whether I create a one screen app or a 4 screen app. The MyGdxGame.java is created from the config at MainActivity.java, but otherwise, MainActivity.java is not used in my game coding, unless I want to add an Android component, like a WebView, then I must add code for that at MainActivity.java, and MyGdxGame.java I am mentioning the AIDE setup of Android and Libgdx, to hope someone might recognize the file structure here, and have an idea of where the build.gradle, file is located; or if there is a workaround to this, that would be fine also.

Android Integration: Install the SDK Add implementation 'com.mixpanel.android:mixpanel-android:7.+' as a dependency to your build.gradle file.

发布评论

评论列表(0)

  1. 暂无评论