cert4android compile error regarding findViewById


I wasn't able to compile cert4android due to error Not enough information to infer parameter T (which appears at every call of findViewById). According to https://stackoverflow.com/questions/44461571/error-on-findviewbyid-after-upgrading-to-compile-sdk-version (and others), the API of findViewById has changed in Android O. However, the gradle file of cert4android targets API 26 (which is Android O).

After changing the calls, I'm able to compile, now. You can find my changes here (I planned to do a merge request, but those aren't permitted in your repository):

This post is deleted!

DAVdroid doesn't compile here anymore when I apply the patch … maybe it's because DAVdroid only embeds cert4android and targets SDK level 25 (but the compile SDK is 26)?


The findViewById method used in the affected file comes from AppCompatActivity which is part of the support library. The change of the method signature was done in revision 26.0.0 Beta 1.

In DAVdroid, you're (accidentally) using revision 26.0.0-alpha1 of the support library (that's the drawback of the discouraged use of 26.+). Newer revisions are only available in the new Google maven repository. You have to add the following repository to the DAVdroid's build.gradle (in the repositories section) in order to use newer revisions:

        maven {
            url "https://maven.google.com"

@korelstar Thanks for the information. As soon as there is a problem with compilation, I'll change the lines.


There will be a problem, when you update the support libraries in order to replace the alpha versions. And this should be done soon (alpha versions are no good idea in a productive app) 😉


@korelstar Does that mean that I have to look up the latest support library version every day? Or do you know a way how to include the latest one?


I have now manually updated the dependency to 26.0.1 in all repos and hope that I'll find some way to get notified about new versions.

Thanks for your patch, has been merged into cert4android 🙂

curl https://gitlab.com/korelstar/cert4android/commit/1b3fde64be1cabd4cf05f0b4948c5e64491b281c.diff | patch -p1 --verbose


Great! 🙂

I think that you can switch back to your old notation using 26.+ (if you really want), since you've added the new Google maven repository.

However, you have the same "problem" with the build tools. And for both cases, Android Studio should notify you in case of updates. Unfortunately, there was no notification for the new maven repository.

Log in to reply

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.