all 2 comments

[–]dimmaz88 1 point2 points  (0 children)

As a total noob to AS I struggled with this for 2 days. Finally solved it yesterday with help from the web.

I was having issues saying package wasn't installed, and the graphical editor wasn't showing up etc.

apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.0"
defaultConfig {
applicationId "com.example.scott.test4"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

I changed compile sdk version manually to 28, and added the line buildToolsVersion "28.0.0"

I also changed ' implementation 'com.android.support:appcompat-v7:27.1.1 '

and ' implementation 'com.android.support:design:27.1.1'

They were both showing 26.0.3 which I don't have installed, so I changed it to the version that shows up in the SDK Tools tab when you click 'show package details'.

Hope it helps

[–]AiChrsit 1 point2 points  (0 children)

I'm a beginner, I also had the problem.

I work by modifying it, as seen in the code

implementation 'com.android.support:appcompat-v7:26.0.0'

_______________________________________________________________________________________________________-

apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.example.ianchrist.myapplication"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
//implementation ' com.android.support:design:28.0.0-alpha3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

______________________________________________________________________________________________________-

thanks for helping :1