简体   繁体   中英

Trying to run my app in my smartphone

I was trying to run my app through my smartphone (a Motorola - Moto G2). For this, I have done the necessary ( installed the USB driver from Motorola and USB debugging), but still does not work. This error appears:

Uploading file local path:C:\\Users\\Felipe\\AndroidStudioProjects\\ColetordeDados\\app\\build\\outputs\\apk\\app-debug.apk remote path: /data/local/tmp/com.k19.treinamento.coletordedados Installing com.k19.treinamento.coletordedados DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.k19.treinamento.coletordedados" pkg: /data/local/tmp/com.k19.treinamento.coletordedados Failure [INSTALL_FAILED_OLDER_SDK]

Update your SDK to the newest Version. Use the Android SDK Manager. http://developer.android.com/tools/help/sdk-manager.html

Check in your manifiest that your "android:minSdkVersion" and "android:targetSdkVersion" are correctly set.

Try to set "android:targetSdkVersion" to 23.

And "android:minSdkVersion" to 21

If you are using gradle, edit your build.gradle file:

defaultConfig {
        applicationId "your package name"
        minSdkVersion 8
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
}

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