Search code examples
androidxmlfontsfont-family

error: resource array/com_google_android_gms_fonts_certs


I'm getting following error in my fonts xml.

anton.xml

<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
        app:fontProviderAuthority="com.google.android.gms.fonts"
        app:fontProviderPackage="com.google.android.gms"
        app:fontProviderQuery="Anton"
        app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
</font-family>

At this line it says cannot resolve symbol:

error: resource array/com_google_android_gms_fonts_certs

Before it worked, but i copied my project from my macbook to a windows pc and for some reason i get this error now.

I tried removing the font and even tried another one but still getting the same error.


Solution

  • Usually, cleaning and rebuilding the project works just fine when you are moving your Android project from the mac to windows. You might have to do a File > Invalidate Cache/Restart as well. If that is still showing the error, you might also want to do a gradle clean. Actually, the files you should really care about are the following.

    app/
        src/
        build.gradle
    build.gradle 
    settings.gradle
    

    Hence you can remove all other files except these. In this case, deleting the ./idea folders did the trick.