The solar credit is available when installed on a "dwelling unit" that the taxpayer uses as a residence. It does not need to be your main home, but it must be something you use as a residence at least some times.
Section 25D does not define "dwelling unit" but in other places in the tax code, a dwelling unit is defined as "includes a house, apartment, condominium, mobile home, boat, or similar property". Generally to be considered a dwelling unit, the property must have living space, a bathroom, and cooking facilities.
If your RV has an internal toilet, then it seems to qualify. If it has living and cooking space but no toilet (you have to use the toilet at your camp ground), or if it has no kitchen or toilet, then I think it probably is not eligible. You may want to consult with your own expert.