How do I manually compile an Android App that requires AppCompatActivity?

73 views Asked by At

I am compiling an android application from scratch without a dedicated IDE such as android studio. But I am using the necessary android tools. The application compiles fine when I have created a basic application that extends Activity.class. But, once I attempt to

import androidx.appcompat.app.AppCompatActivity

and

extends AppCompatActivity

in the MainActivity class definition, the compilation breaks down with the error

the hierarchy of the type MainActivity is inconsistent

What exactly does such an error mean in general android development? And then, if anyone compiles android applications without gradle/maven support, what classes do I need to include to compile an app that uses AppCompatActivity.class?

I have compiled a similar project on Android studio or running a gradle build. I have been practising building without the specialist tools for a bit, and sadly this time, I also find that I am practising in an environment that does not support those tools.

So, any assistance will be appreciated. I tried to download activity-1.5.1.jar dependencies from the Google maven repository one by one, it contains AppCompatActivity.class. But, I have had no luck whatsoever in getting a working product.

0

There are 0 answers