Skip to content

Known caveats

Piasy edited this page May 18, 2016 · 30 revisions

Known caveats

Details

Incompatible with ButterKnife

The resource variables (id, string, color, etc.) generated by BUCK is non final, so BUCK is incompatible with ButterKnife.

Workaround:

  • Change @Bind/@InjectView to ButterKnife.findById.
  • Change @OnClick to setOnClickListener, etc.
  • Change switch-case to if-else-if.

AIDL work-around

If you used self implement parcelable in your aidl, you need create a separate library module contains those custom implementations, otherwise BUCK build will fail. See the example of common module and parcelable module.

Incompatible with Fabric crash report

Fabric crash report gradle plugin will generate an unique uuid during the process of gradle build, and will upload this uuid to its server, and this uuid will be used at runtime of your application (by adding this uuid to the string res of your app), while these jobs couldn't be done by BUCK, more detail could be found at #10.

Workaround:

  • Define a BuildConfig in build.gradle, with default value to disable fabric (not call Fabric.with(...) method) but flavor value to enable it.
  • Then use OkBuck and BUCK in daily develop build, but use gradle build to release.
Clone this wiki locally