Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No, minSdk(API 15) > deviceSdk(API1) in android studio

I am a newbie in android development. Yesterday, I have setup my environment in windows 8, I have downloaded android SDK, when i run it, asked me to install some tools. I have installed all. After that i tried creating a sample project, then I run it on my phone connecting with USB. I am succeed in windows.

But, Now I tried to connect to my android studio in linux mint. I am getting error as No minSDK, and also I went to the sdk folder and opened terminal and run like this

adb devices
  • daemon started successfully * ZL2GLMA5A0811781 no permissions

That is the output... Please help me out...

EDIT:

I have enabled developer options and also USB debugging. As I mentioned already, it worked well on windows 8 with IntelliJ but in android studio,linux mint it's not working...

like image 309
Lokesh Sanapalli Avatar asked Jan 09 '16 02:01

Lokesh Sanapalli


People also ask

What is minSdk version in Android?

android:minSdkVersion — Specifies the minimum API Level on which the application is able to run. The default value is "1". android:targetSdkVersion — Specifies the API Level on which the application is designed to run.

Where is API Level in Android studio?

Step 1: Open your Android Studio, and go to Menu. File >Project Structure. Step 2: In project Structure window, select app module in the list given on left side. Step 3: Select the Flavors tab and under this you will have an option for setting “Min Sdk Version” and for setting “Target Sdk Version”.

What is minimum API Level in Android studio?

When you upload an APK, it must meet Google Play's target API level requirements. New apps must target Android 12 (API level 31) or higher; except for Wear OS apps, which must target Android 11 (API level 30) or higher.

What is API Level in Android studio?

What is API Level? API Level is an integer value that uniquely identifies the framework API revision offered by a version of the Android platform. The Android platform provides a framework API that applications can use to interact with the underlying Android system.

How to change Min SDK version in Android Studio?

Click android studio menu ” File —> Project Structure “. In Project Structure dialog, select app in Modules list. Select Flavors tab in right panel, then you can select your desired android Min Sdk Version and Target Sdk Version.

What is the SDK version of an Android app?

First, we should know the below two terms about the android SDK version. minSdkVersion: This is the minimum version of android os that your app support. targetSdkVersion: This is the android os version which your app actually executed with. Your app should compatible with all the android os versions between minSdkVersion and targetSdkVersion. 1.

What is the minimum SDK version required to use the widget?

This means your current android minimum SDK version is 1.7, which is too low to use this widget. You need to change it to 23. This article will show you how to change it in android studio. First, we should know the below two terms about the android SDK version.

Why call requires API level 23 in Android Studio?

When you use the android widget in layout XML or java code, you may encounter error messages like Call requires API level 23 (current min is 17):. This means your current android minimum SDK version is 1.7, which is too low to use this widget. You need to change it to 23. This article will show you how to change it in android studio.


2 Answers

You have to set up your linux mint system to detect your device.

If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development.

In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property.

For a list of vendor IDs, see USB Vendor IDs, below.

To set up device detection on Linux follow these steps:

Step 1:

Log in as root and create this file: /etc/udev/rules.d/51-android.rules

Use this format to add each vendor to the file:

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"  

In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.You can find vendor ID in above link.

Step 2:

Now execute:

chmod a+r /etc/udev/rules.d/51-android.rules

For detailed information please check this and this.

Disconnect the USB cable between the phone and the computer.

Reconnect the phone.

Run adb devices to confirm that now it has permission to access the phone.

if above steps doesn't work for you then kill and start the adb server again. On linux: sudo adb kill-server and then sudo adb start-server. Then it will detect nearly every device out of the box.

I hope it helps you.

like image 126
Rajesh Avatar answered Oct 17 '22 08:10

Rajesh


Solution->End process adb.exe from Task manager

process-> 1)Press ctrl+shift+Esc (to open task manager) 2)now click on processes tab 3)click on adb.exe 4)click on End process

Now run your application

still not working do above process 2-3 times..

Thats it..!!

like image 20
roshan Avatar answered Oct 17 '22 09:10

roshan