Reputation: 33
When i try to import the sample project in android studio from below URL of developers.android .com
http://developer.android.com/samples/RepeatingAlarm/index.html
and i getting below error in android studio
What was i made mistake to import that.
Please give me suggestions to import this project.
Thanks for reply.
Upvotes: 0
Views: 3193
Reputation: 1748
Just click on the hyperlink and Android Studio will fix it. As you can see from screenshot it is using Android Gradle plugin 0.9.2, but require newer maybe 0.11.+ as you are using Android Studio 0.6.1
EDIT Bellow is build.gradle file as you should have in RepeatingAlarmSample folder in order for application to work. Your Android SDK should be up-to-date build tools 19.1 and as I mention in comments use Gradle 1.10, 1.11 or 1.12
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.11.+'
}
}
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
}
dependencies {
compile "com.android.support:support-v4:19.1.+"
}
Upvotes: 1