# Tinker app source code for Android

**URL:** <https://community.particle.io/t/tinker-app-source-code-for-android/50952>\
**Category:** Developer Tools\
**Created:** [July 8, 2019, 9:36pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952 "2019-07-08T21:36:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 8, 2019, 9:36pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/1 "2019-07-08T21:36:49Z")

</div>

Hello,

is there a source a tinker app source code for Android available? It looks like there’s Particle\_android Git repo but I don’t see Tinker app. There’s an iOS Tinker app source code so it’s strange there’s no Android version as well.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [July 8, 2019, 9:54pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/2 "2019-07-08T21:54:07Z")

</div>

This repo seems to me to contain the Android App sources which _include_ the Tinker features.

> **[particle-iot/particle-android](https://github.com/particle-iot/particle-android)**
>
> Particle Open Source for Android. Contribute to particle-iot/particle-android development by creating an account on GitHub.

You can search the repo  
[https://github.com/particle-iot/particle-android/search?&q=tinker&unscoped\_q=tinker](https://github.com/particle-iot/particle-android/search?&q=tinker&unscoped_q=tinker)

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 8, 2019, 10:23pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/3 "2019-07-08T22:23:22Z")

</div>

Thanks.  
The reason I asked is because I can’t seem to build any of the projects, I’m getting an error:

_ **This**  **version of Android Studio cannot open this project, please retry with Android Studio 3.5 or newer.** _

I thought if Tinker app is open source it would successfully build and that could be my starting point. As of right now nothing builds and I don’t know the cause.

Has anyone else seen this issue with the repo?

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 9, 2019, 5:31pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/4 "2019-07-09T17:31:13Z")

</div>

I downloaded a beta version of Android 3.5 and now I’m getting the following failure:

**File google-services.json is missing. The Google Services Plugin cannot function without it.**

What is this for ?  
Particle Team, why is the Android SDK so buggy? Shouldn’t this work ???  
This is very frustrating.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [July 9, 2019, 6:52pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/5 "2019-07-09T18:52:45Z")

</div>

I think I saw you also post in [a thread](https://community.particle.io/t/new-repository-for-all-particle-android-projects/47786) tagging @jensck_particle - he should know best.

* * *

Please _ **don’t** _ spawn any more threads for the _same_ “issue”.  
You already have multiple threads dealing with this - lets stick to one and don’t open any new ones. This would only skatter the discussion and won’t attract any more (positive) attention.

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 9, 2019, 8:29pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/6 "2019-07-09T20:29:35Z")

</div>

Ok. I thought since the error was different that it’s a different issue but I guess it is related to SDK issue.

---

<div class="post-metadata">

**Author:** ![jensck\_particle](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jensck\_particle](https://community.particle.io/u/jensck_particle)\
**Post date:** [July 10, 2019, 10:43pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/7 "2019-07-10T22:43:18Z")

</div>

You’re right, the app should build correctly, without special instructions, just by cloning the repo. _(With the occasional exception of requiring Android Studio beta versions, which I think is a reasonable requirement for anyone cloning the repo. It may be mildly annoying, but I only require AS betas when it provides a meaningful velocity boost on my end.)_

Anyway, the `google-services.json` issue will be fixed in the next couple days, but for now, try commenting out the lines:

`apply plugin: 'io.fabric'`

and

`apply plugin: 'com.google.gms.google-services'`

which are found near the beginning and end of the file, respectively.

Let me know if you still have any issues after trying that.

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 10, 2019, 10:57pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/8 "2019-07-10T22:57:13Z")

</div>

In what file should I make this change?  
Android Studio can’t find google-services.json.

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 10, 2019, 11:03pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/9 "2019-07-10T23:03:50Z")

</div>

I commented out those two lines in gradle script and that seemed to have worked.

Now I got resource error:

AAPT: error: resource drawable/product\_image\_photon (aka io.particle.devicesetup.testapp:drawable/product\_image\_photon) not found.

At least i’m moving in the right direction 🙂

---

<div class="post-metadata">

**Author:** ![jensck\_particle](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jensck\_particle](https://community.particle.io/u/jensck_particle)\
**Post date:** [July 11, 2019, 4:39am UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/10 "2019-07-11T04:39:58Z")

</div>

Ah, the sample apps are having trouble.

Open `settings.gradle` and comment out the following lines:

```auto
sdk_example_app
setup_testapp
setup_exampleapp

```

I’ll get these fixed shortly, too, but I just tried checking out and building from a freshly-cloned copy of the repo, and it worked after making this change and the gradle plugin changes. Sorry for the hassle.

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 11, 2019, 7:56pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/11 "2019-07-11T19:56:05Z")

</div>

I commented those 3 lines and then I got the following errors:

| — | — |  
|Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: class io.particle.firmwareprotos.ctrl.Common.IpAddress, unresolved supertypes: io.particle.firmwareprotos.ctrl.Common.IPAddressOrBuilder||

|C:/particle-android-master(1)/particle-android-master||  
|mesh/src/main/java||  
|io/particle/mesh/setup/flow/setupsteps/StepEnsureEthernetHasIpAddress.kt||  
|Unresolved reference: v4||  
|Unresolved reference: v6||

So I have to add some dependancies maybe.  
the error is pointing to line 37 in file StepEnsureEthernetHasIpAddress.kt :

it.address.v4.address.truthy() || it.address.v6.address.truthy()

---

<div class="post-metadata">

**Author:** ![jensck\_particle](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jensck\_particle](https://community.particle.io/u/jensck_particle)\
**Post date:** [July 15, 2019, 7:45pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/12 "2019-07-15T19:45:15Z")

</div>

Strange. I just checked out the project fresh from the repo and (after making those plugin/settings.gradle changes), it worked fine.

Can you verify that you have the following file in your repo directory?  
`photon-tinker-android/firmwareprotos/src/main/java/io/particle/firmwareprotos/ctrl/Common.java`

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 16, 2019, 4:56pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/13 "2019-07-16T16:56:36Z")

</div>

My repo starts with particle-android , not photon-tinker-android. Besides that I do have Common.java.

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 16, 2019, 5:03pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/14 "2019-07-16T17:03:44Z")

</div>

Could you explain the steps you took to make it all work? I want to make sure I’m not doing anything weird.

Thanks

---

<div class="post-metadata">

**Author:** ![jensck\_particle](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jensck\_particle](https://community.particle.io/u/jensck_particle)\
**Post date:** [July 16, 2019, 5:34pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/15 "2019-07-16T17:34:06Z")

</div>

What you have locally should match what I have now that you’ve made that `settings.gradle` change. Can you try `cd`-ing to `particle-android/app` and then running: `..\gradle.bat assembleDebug`

That _should_ build the APK for you. Out of curiousity, are you able to build other projects/apps with this Android Studio installation?

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 16, 2019, 7:18pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/16 "2019-07-16T19:18:49Z")

</div>

I don’t have gradle.bet in /app directory.

 ![gradle](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/2/6/268218c2f76bd03510c6c58687f354e1af8b61eb.jpeg)

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 16, 2019, 7:22pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/17 "2019-07-16T19:22:08Z")

</div>

To answer your second question, I haven’t tried any other projects besides particle with this AS installation.

---

<div class="post-metadata">

**Author:** ![jensck\_particle](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jensck\_particle](https://community.particle.io/u/jensck_particle)\
**Post date:** [July 16, 2019, 7:51pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/18 "2019-07-16T19:51:01Z")

</div>

Sorry, I meant `gradlew.bat` (I’m not sure if you need to type the `.bat` part; I haven’t used Windows in forever.)

---

<div class="post-metadata">

**Author:** ![grassclippings](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@grassclippings](https://community.particle.io/u/grassclippings)\
**Post date:** [July 16, 2019, 8:05pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/19 "2019-07-16T20:05:56Z")

</div>

I ran “gradleew assembleDebug” and got the following output:

Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

- What went wrong:  
Unable to start the daemon process.  
This problem might be caused by incorrect configuration of the daemon.  
For example, an unrecognized jvm option is used.  
Please refer to the User Manual chapter on the daemon at [https://docs.gradle.org/5.4.1/userguide/gradle\_daemon.html](https://docs.gradle.org/5.4.1/userguide/gradle_daemon.html)  
Process command line: C:\Program Files (x86)\Java\jre1.8.0\_60\bin\java.exe -Xmx1536M -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\301312.gradle\wrapper\dists\gradle-5.4.1-all\3221gyojl5jsh0helicew7rwx\gradle-5.4.1\lib\gradle-launcher-5.4.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.4.1  
Please read the following process output to find out more:

* * *

Error occurred during initialization of VM  
Could not reserve enough space for 1572864KB object heap

- Try:  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

- Get more help at [https://help.gradle.org](https://help.gradle.org)

---

<div class="post-metadata">

**Author:** ![jensck\_particle](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jensck\_particle](https://community.particle.io/u/jensck_particle)\
**Post date:** [July 22, 2019, 10:48pm UTC](https://community.particle.io/t/tinker-app-source-code-for-android/50952/20 "2019-07-22T22:48:03Z")

</div>

I wish I could be of more help, but this sounds like an environment problem, not an issue with anything in the repo, so it’s beyond what I can walk you through here.

[Next page](https://community.particle.io/t/tinker-app-source-code-for-android/50952.md?page=2)
