particle-iot / particle-android

Particle Open Source for Android
Apache License 2.0
37 stars 38 forks source link

Trouble compiling examples 'quickstartFile' does not exist. #82

Closed jacky4566 closed 5 years ago

jacky4566 commented 5 years ago

I am having some trouble compiling the sdk example. This is a fresh install of Android Studio with SDK 28

What is my next step to resolve?

* What went wrong:
A problem was found with the configuration of task ':app:processDebugGoogleServices'.
> File 'S:\...\particle-android-master\app\google-services.json' specified for property 'quickstartFile' does not exist.
bloukingfisher commented 5 years ago

If you've not created and added your own google-services.json file from https://firebase.google.com/, then in the app/build.gradle comment out: apply plugin: 'io.fabric' (line 22) apply plugin: 'com.google.gms.google-services' (line 147)

In settings.gradle comment out: sdk_example_app setup_testapp setup_exampleapp

That's assuming you're running the "app". Give that a try. Otherwise adjust accordingly in settings.grade

jacky4566 commented 5 years ago

OH. Ok. I created a firebase account and added the appropriate JSON. That seems to have fixed the issue. Now I'm running into issues with io.particle.firmwareprotos.ctrl.Common.IPAddressOrBuilderwhich i think you are already working on?

* What went wrong:
Execution failed for task ':mesh:compileDebugKotlin'.
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
bloukingfisher commented 5 years ago

The way I solved it is: uncomment lines 39-46 where v4 and v6 is used in \mesh\src\main\java\io\particle\mesh\setup\flow\setupsteps\StepEnsureEthernetHasIpAddress.kt

    val iface = reply.`interface`
    for (addyList in listOf(iface.ipv4Config.addressesList, iface.ipv6Config.addressesList)) {

      /*  val address = addyList.firstOrNull {
            it.address.v4.address.truthy() || it.address.v6.address.truthy()

        }
        if (address != null) {
            log.debug { "IP address on ethernet (interface ${ethernet.index}) found: $address" }
            return
        }*/
    }
jacky4566 commented 5 years ago

Great, that at least gets me the example working.

jensck commented 5 years ago

Update: the firmwareprotos compilation issue is finally fixed in master.