Hello,
I am new to the platform and would need your help,
when I want to add the component: android.support.v7.app.AppCompatActivity;
He tells me he’s a unknown, how do I get him to recognize him.
Thanks in advance,
Hello,
I am new to the platform and would need your help,
when I want to add the component: android.support.v7.app.AppCompatActivity;
He tells me he’s a unknown, how do I get him to recognize him.
Thanks in advance,
You need to add this dependency to your app module’s build.gradle file inside dependencies:
dependencies {
compile fileTree(dir: ‘libs’, include: [’*.jar’])
implementation 'com.android.support:appcompat-v7:25.+'
implementation 'com.android.support:design:25.+'
}
thanks a lot for your help
Please note that if you created the project with AIDE itself, the project will be created with old stuff; i.e. Activity instead of AppCompatActivity. Since you are aware of this, i should tell you that you must change the default theme used in styles folder to this, if you haven’t already:
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorControlNormal">@color/colorControlNormal</item>
<item name="colorControlHighlight">@color/colorControlHighlight</item>
</style>
</resources>