Running the 'Blank activity' on Android Studio error - android

When I try to run the default 'Hello world' activity or blank activity I get the following error:
minSdk(API 23, N preview) != deviceSdk(API 23)
I'm using Android Studio 2.0 and I have tried multiple Virtual Devices. (Nexus 4, 5, 6P) But they all gave the same error. I updated and installed a lot of files on the SDK manager. I have no clue what the problem is. Again I haven't changed the file, it is just the standard Blank activity. I just installed Android Studio and I'm new in this area. I hope it's a common mistake or error. Can someone help me out please? Thanks!

You appear to have set up the project to use the N Developer Preview, which means that it will only run on N Developer Preview devices and emulators.
Assuming that this is a typical Android Studio project, open app/build.gradle. In there, you will see minSdkVersion, targetSdkVersion, and compileSdkVersion. Probably all are set to 'N'. If that is not what you want, change them to something else (e.g., 23).

Related

Visual Studio 2015 Unsupported Devices

I have a new set up visual studio 2015 (updated) in a new laptop and I am having a problem with my project from an old laptop. I don't know why my device and 2 emulators are listed on Unsupported Devices in this new set up visual studio.
Minimum Android version is set to android 4.1 jelly bean
target is set to compile using SDK version
Compile using nougat 7.0/also tried to marshmallow 6.0
I have my phone nougat 7.0 and 2 emulators 6.0 but I don't know why from my copied project from old laptop says API Level is less than the minimum Android version defined in the manifest file
Already tried to delete bin and obj folders. Tried to set min, target and compile with other combinations but no luck to solve this issue.
What can I do with this old project in my new VS 2015 set up? My new projects don't have a problem at all.
I ran into the same problem, there's a "minimun android version" dropdown under the Android Manifest tab in the project settings. Changing it there made my emulator pop up again. Got the idea by reading this: https://developer.xamarin.com/guides/android/application_fundamentals/understanding_android_api_levels/
Edit: I'm using Visual Studio 2017 Community
I found the answer for this. I have found out that it is because of API 24 and up from my SDK manager. I deleted those API and voila ! Unsupported devices are gone and back to normal . I don't know if it is because of the project built from another laptop only having API 23 below and when I transferred it to a my laptop with Nougat and Oreo API, unsupported devices happened. Hope it give helps to other coders.

Android studio 1.5.1 'Rendering problems' error

I have android packages for 4.4, 5 and 6 installed in my android sdk. When i reduce the API level from 23 to 19(android 4.4). i get the following error:
------Rendering problems----
The graphics preview in the layout editor may not be accurate
-porterDuff Color filters are not supported
please how can solve this
I have been able to solve this by clicking the refresh button close to the mobile phone image. If this doesn't work, then consider reinstalling android studio.

How do i resolve this error "Installation failed with message INSTALL_FAILED_OLDER_SDK"?

Ok, so i have been using eclipse for my android development but then i noticed that the eclipse IDE gave me a lot of errors and i researched online and found that Android Studio was worth a shot. So, i downloaded android studio yesterday and then created a test application. The Target SDK was 15 and i was using Android 2.0 Froyo to test my application since it loads faster. Now, when i run my app, i get that annoying message and i have no clue how to fix it. Please guide me through the steps of fixing it. Thanks a lot
The minSdkVersion in your project -- whether from your code or from a library -- is higher than the API level of the device or emulator on which you are trying to run your app. Either:
Adjust your minSdkVersion, or
Use a device or emulator that is capable of running Android at the level specified by your minSdkVersion

Android Studio Robotium Recorder Plugin Compatibility issue

I have Android API Levels 15,19,20,21 and Android Studio 1.0.1.
Robotium Recorder needs API 15 or higher version. Information about Robotium API support
I follow that guide from Robotium's page
and also I tried many things like those (all following steps were tested separately from each other);
I created emulators that's API level 15 and 19, Than I tried to start Robotium,It did not work.
I connected my Android phone which is API level 19,that did not work again.
I started Android Studio with administrator permission everytime.
I downloaded robotium.jar here It did not work.
I tried every method in my mind.
My minimum sdk version and target sdk version is also 19.
But when I clicked "New Robotium Test" button, immediately appears warning text that is "Please install a compatible Android API level (15 or higher)"
There is a screenshot about problem. Any advice?
You probably have two Android SDK:s installed in your computer. If you go to settings (on the left side of "New Robotium Test") you can change the SDK to be used by Robotium Recorder.
http://robotium.com/pages/user-guide-android-studio

Problem with eclipse Android SDK update

I am newbie to android. I working on my HELLO WORLD project. Initially I had AVD which looks like
Then something went wrong so I deleted all Android stuff from Eclipse (except my project) then I added all things again to my Eclipse.
So now I have:
1) Android SDK tools , revison 12
2) Android SDK platform-tools,revision 6
3) SDK platform Android 3.2,API 13,revision 1
Now I got a new emulator which looks like a tablet emulator .
So my questions are
1) How can I get the previous emulator as Image 1 ( which looks like phone not tablet) ?
2) I am also getting error "Unable to resolve target Android-8". Why it is ? and how to get rid of it ?
Answers to your questions:
Ad 1) You need to install SDK platform for Android 1.x/2.x, Android 3.0 is dedicated to tablets so there will be no phone-like emulator,
Ad 2) Android-8 means Android API Level 8, this means Android SDK version 2.2.x. so you will need to install SDK for Android 2.2.x from the Android SDK Manager
More about Android API levels can be found here: http://developer.android.com/guide/appendix/api-levels.html
1.when creating avd you are selecting target.If you select target 2.1,2.2..You will see the first emulator and for the later one your are selecting taget 3.2 . So it looks like this.
2.You are importing/creating project from previous one whose target was api level 8.Now you are trying to run it in avd which is some other.So in manifest file set minSDK as your new avd
With the SDK manager, you have to create a new virtual device. For this virtual device you will set the Android version of your device (must be < 3 to have the "old" look).
It is simple
1) Create AVD
2) While creating if u want to develop for smart phone, select the target version <= 2.3 (Which will get you the keyboard)
3) While creating if u want to develop for tablet, select the target version as >= 3.0, which will get you the big pad emulator with no keypad.
Note: From Icecream sandwidch onwards the version is for both Smart phones and Tablets.
Regards,
SSuman185
You need to create new AVD with the target that you need,or edit the settings of the AVD that you are using now.
In Eclipse go to menu : Window -> Android SDK and AVD Manager and you will see a list of your AVD(if you have more than one).And after that you can select the one that you have,and press edit with changing the target to 1.5 and upper version or create a new one pressing button New.

Categories

Resources