In addition to what JordiCP said, the RasPi 2 has 4 full-size USB ports. If you need that, you'll be hard-pressed to find an Android phone that has it. Furthermore, it is generally simpler and easier to program for desktop Java (using B4J) than it is to program for Android (using B4A). There are no Activities, Services and corresponding life-cycle management issues with which to deal. And, finally, if you want to run an HTTP server, the B4J jServer library is much more powerful than the B4A HttpServer library.
There are some downsides, though. JavaFX support is pretty spotty on the RasPi. Many users will be less familiar with desktop Linux than they will be with Android. And the inverse problem, as well: a knowledgeable user can gain superuser privileges on a RasPi with little effort if you haven't password-protected it whereas, on Android, it is much more difficult. Of course, whether this matters to you will depend on the details of your project.