I want to print a "Hello World" on the screen, created a new project with any name in Android Studio, clicked "Run" and it returned me this error ...
I checked the AndroidManifest and everything looks OK (add sdkMin and sdkTarget and it also did not work):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.saapc.meumapa" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".IndexAcitivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
In build.graddle I also tried to change the configuration of the SDK min and target, also without success ...
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.saapc.meumapa"
minSdkVersion 15
targetSdkVersion 'L'
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
I tried to install several SDKs and packages in SDK Manager, nothing solved. On all the sites I saw asking about this error they said to change MinSkdVersion and TargetSdkVersion. How do I resolve this?