I also can’t get it to build, and followed all the steps @jensck_particle provided. Getting to the last step to run “gradlew.bat assembleDebug” results in these errors for me (these errors match errors I get in AndroidStudio):
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\AndroidPreview\particle-android\mesh\build\intermediates\packaged_res\debug\values\values.xml:125:5-242: AAPT: error: unescaped apostrophe in string
C:\AndroidPreview\particle-android\mesh\build\intermediates\packaged_res\debug\values\values.xml:125:5-242: AAPT: error: not a valid string.
C:\AndroidPreview\particle-android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml: AAPT: error: file failed to compile.
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':mesh:compileDebugKotlin'.
> Compilation error. See log for more details
That’s not good! I’ll fix that shortly; thanks!
1 Like
@jensck_particle I’m still trying to get it to build. Using the latest code after I noticed you made some updates, the error about “unescaped apostrophe in string” is gone.
HOWEVER, I have the same error as @grassclippings. This is true of Android Studio 3.5 RC 3 build, running the gradlew.bat assembleDebug and now even going through the process on Mac trying to build it. All result in the error:
“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”
> Task :mesh:compileDebugKotlin FAILED
w: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+InlineClasses
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
e: 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
e: C:\AndroidPreview\particle-android2\mesh\src\main\java\io\particle\mesh\setup\flow\setupsteps\StepEnsureEthernetHasIpAddress.kt: (40, 28): Unresolved reference: v4
e: C:\AndroidPreview\particle-android2\mesh\src\main\java\io\particle\mesh\setup\flow\setupsteps\StepEnsureEthernetHasIpAddress.kt: (40, 62): Unresolved reference: v6
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mesh:compileDebugKotlin'.
The only way I can get it to build (but I’m guessing breaking something with mesh setup) is to 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
}*/
}
I have to say I’m a bit mystified. All the other protobuf classes apparently resolve just fine, but not this one, even though the source code is definitely in the repo.
For now, yeah, just comment out this line. I’ll look into this again when I have some time next week. Sorry for the troubles in the meantime.
1 Like
Update: Going to try to look at this tomorrow, but it may get bumped to next week. Thanks for your patience!