I am starting Android development. I follow this Getting Started guide and use Android Studio (not eclipse).
I launched Hello World on my device, so far so good. But..
The problem occurs when adding this import: (according to the instructions in the manual)
import android.support.v4.app.NavUtils; // cannot resolve symbol 'support'
This seems to be necessary for this line (commenting this out and automatically allowing import did not work)
NavUtils.navigateUpFromSameTask(this);
Import support is red underlined, mouseover tells me Cannot resolve symbol 'support'
Building will not work with anyone. I saw answers to similar questions, such as; offering to clear the cache and restart (tried this), offering to launch the SDK Manager as an administrator and update (tried this), and some other problems / solutions that seem specific to eclipse.
I am new to Android and IDE development. How about fixing this in Android Studio v0.2.9?
Edit:
The contents of my build.gradle file
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 7 targetSdkVersion 16 } } dependencies {
android import android-studio
Barry staes
source share