Reputation: 2539
I am trying to add another activity to my project but it seems like the options for that are greyed out
Here's what it looks like to me:
Upvotes: 4
Views: 6072
Reputation: 31
I had the same problem to solve.
Go to Gradle and check the following settings:
defaultConfig {
applicationId "com.hawiLLC.hawiblogapp"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Check on the minimum minSdkVersion
.
Upvotes: 3
Reputation: 21
I had the same problem. In order to change the minumun SDK level in a Android Studio project I had to change it in build.gradle
instead of the AndroidManifest.xml
. This is part of the file I modified:
android {
compileSdkVersion 'Google Inc.:Google APIs:23'
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.myfirstapp"
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Upvotes: 2
Reputation: 8338
You need to change your minimum SDK level. That's why it's greyed out - yours is set to be too low.
In your AndroidManifest.xml
, right under <manifest . . . >
, add this:
uses-sdk android:minSdkVersion="15" />
You can change the value there to any value...you only really need 8 or higher for most of the activities you are trying to add.
Upvotes: 4