简体   繁体   中英

Trouble running hello world android app

I'm a newbie who installed Android studio but simply can't get a simple hello world app to run!

Whenever I try running a program, I get the error :

Failure [INSTALL_FAILED_OLDER_SDK]

I've been googling but to no avail. I've changed build.gradle to :

defaultConfig {
     applicationId "com.minimap.Minimap.minimap"
     minSdkVersion 8
     targetSdkVersion 8
     versionCode 1
     versionName "1.0"
}

and I added this to my manifest :

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>

Yet the hello world app fails to run on two different cellphones (a samsung galaxy s3, and an alcatel), so I'm guessing the problem is on android studio's side. I'd like to mention that I have not forgotten to install the API 8 sdk

Do you guys have any idea what might be going on? Any help would be greatly appreciated.

You should try to set your targetSDKVersion to 22 (The lastest Android revision). It will let you use the latest library included in Android.

Also, on Android studio, using Gradle, you dont' have to add the uses-sdk tag in your Android Manifest

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>

It will be override during the build phase

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM