Android Studio Robotium Recorder Plugin Compatibility issue - android

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

Related

In eclipse I a getting the API level 20 .I want ot use lower versions of API

How to change API level. when selecting this API level it shows no CPU/ABi available and also I am not able to add text fields it throws an exception.
Image 1Image 2
In Eclipse go to manifest.xml
<uses-sdk android:minSdkVersion="int" />
In android studio: go to your app Gradle there you can find the minSdkVersion. Lower it to the version you needed.
android {
....
defaultConfig {
....
minSdkVersion 17
....
}
}
Quick Fix: Uncheck installed checkbox to see other downloads and try to refresh android sdk manager, restart it or restart the computer. API 19 worked fine for me before I moved to android studio.
I'm not sure if API 20 is supported in eclipse, I recommend Android Studio for android development. Anyway, if you have an old PC that does not meet android studio minimum requirement, download IntelliJ IDEA https://www.jetbrains.com/idea/, it's a bit lighter and free and require 1 GB of RAM (But 1 GB is very bad, you need at least 2 GB without running android emulator). However, if you still want to work with eclipse I think you need API 19 you have to download it manually from the web and move it to android SDK location. Or you can install android studio to download SDK without using it.
Newer APIs are way better, they have more libraries that supports both old and new android versions. It's really worth upgrading to Android Studio.
For the CPU/ABi error check this post Android 4.3 Virtual Device CPU/ABI - No system images installed (eclipse)

Instant apps min sdk version

I have a project that has min sdk 16 and I would like to add support to instant apps. Is it possible to add that feature to mine project? I also detect that I can't create a new project with option "Include Instant App support" to sdk < 23:
So I suppose that also not possible to add that feature to the existing project with min sdk < 23.
I will be very grateful if the answer will contain a link to the information.
The Android App Links feature was introduced in Android 6.0 and lets
users tap on a web link to open your app (if it is already installed).
Instant apps leverage the same app links feature to create HTTPS URLs
that launch activities in your instant app.
Courtesy goes to philo's Answer
There's no required minimum. 15 is fine. But FYI, your app won't run
on 15. The Instant Apps runtime itself isn't compatible that far back.
At the moment, that only goes back to 23 (but we're working on that).
According to the Android Instant Apps: Android Instant Apps supports the latest Android devices from Android 6.0 (API level 23) through Android O, across more than 40 countries. We'll be rolling out to more devices and countries soon, including expanding support to Android 5.0 (API level 21) devices shortly.
FYI : https://developer.android.com/topic/instant-apps/faqs.html
This page teaches you how to build and run a very simple instant app using Android Studio.
Android Instant App
With reference SO answer and android documentation Currently it has been fixed with android studio 3.1 Canary 5

Relation between android version of device and version specified in the app

While creating a project using eclipse i have Minimum SDK required as Android 2.2(Froyo) and Target SDK as Android 4.2(Jelly Bean) compile with Android 4.3. I have used sqlitebrowser v2.ob1 for creating database. My app runs without any errors (few lines in red in logcat though) and meets my requirements when i run it in an emulator. I tried 3 different emulators and it works fine. But when i tried this app in a mobile device it shows force close whenever there is something to do with database. I mean to say that it shows force close when it has to retrieve from database or connect to database. By searching i learned that just the .apk file is enough for the app to run even if externally created database is used in it (copying to assets folder and then to the default location). My questions are
Shouldn't my app work fine in any device ranging from Android 2.2 to 4.2 ?
Should i try compiling the app with Android 4.2 instead?
Am not sure about the version of the device i tried it in but am sure its within 2.2 and 4.2 . (Probably gingerbread). Other than plugging the device to PC via USB and seeing logcat (bcoz i dont own an android mobile phone) what can i do to solve this?
How is the app's version, emulator and version of mobile or any other device related?
My app can run on what versions of devices?
This is my first android app so any help is appreciated. Thanks in advace
It's possible that you are using a feature in your application that isn't supported by a lower version of the SDK. It's difficult to tell you exactly what that might be without any source code or stacktrace, but I can clear up your understanding of minSdkVersion and targetSdkVersion.
Consider that with each new version of the Android SDK, additional features and APIs are introduced that did not exist in previous versions. Obviously, the older versions of Android don't support those features.
When you specify a targetSdkVersion you are specifying that you are using features that were introduced in that particular version of Android. You are also implying that you have tested your application at that particular API level, and that it works as it should.
When you specify a minSdkVersion that is lower than your targetSdkVersion, you are implying that your application will work properly on a lower API level because you have manually programmed tests or checks in your code to ensure that the current API level is compatible with a feature before running it.
For example, if I wanted to run a feature introduced in Jelly Bean but I want to retain support for a lower API level (e.g. Gingerbread), I might add the following check before I run the feature (see other version codes here):
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
// run some code specific to API level 16
}
The Android SDK can automatically deal with code introduced in a lower API level, but it can't automatically deal with code specific to a higher API level.
So with that in mind, to answer your questions:
No, it's only guaranteed that your application will work properly on Android 4.2. It's up to you to ensure that it remains backwards compatible for earlier versions that you wish to support.
It shouldn't matter. Instead, you should first determine if your application runs on a device/emulator that is running the same API level as you are targeting (Android 4.2, API level 17), then run it on a device/emulator running a lower version and try to isolate the code that is causing it to crash (logcat will be helpful).
You can check the Android version of a device by going into Settings > About phone > Android version. If it is running Gingerbread, keep in mind that a lot of new features have been introduced since then and your application might be using some of those features. For the emulator, you can specify an API level when you create an emulator (you can download other versions to use from the SDK Manager).
I think my answer so far has made this relationship clear.
To reiterate, your application WILL run on any device running Android 2.2 or later, but it can crash if you are using features from a higher API level than the device is running.
If this is still not clear, you should read more about supporting multiple platform versions in the Android documentation: here.

Android emulator compatibility with Google APIs

I wrote a simple code which implements MapView using Eclipse and ADT plug-in updated today. in order to test it I created a new emulator based on Galaxy Nexus device and target for Google APIs level 17. The emulator has been created without errors and starts properly.
I set project properties for targeting Google APIs. I compiled the project and I tried to run in on my emulator, but I got a warning message: No compatible targets were found, Do you wish to add a new Android Virtual Device?
Independently on the button I click, a new avd windows appear and my new emulator is highlighted by a red cross instead of the green check sign.
I can choose to ignore the warning and continue with my emulator, but my application blocks before reaching main activity onCreate() method I am sure because I have placed a breakpoint inside the method which is never reached.
I added internet permission tag to manifest ans API keycode I got from Google.
Is anyone able to explain me what is the problem with my project?
Thank you very much.
If you used Google APIs level 17 as the target of your project, make sure your emulator's API level is also 17.
You could have possibly created an emulator using Google API but the API level is different.
To check the emulator's API level, open your AVD, then confirm if target name is Google APIs(Google Inc.) and API level is 17.

Android -- selecting API from SDK Manager

I have downloaded the Android SDK(which i think has no version, it is standard). After installing Android SDK, Android SDK Manager comes which by default selects 3 things to be downloaded (1)Android SDK tools(2)Android 4.0.3 (API 15) and the things under it like documentation, samples etc (3)Google USB driver But at present i am having book on Android 3, so should i deselect the second option i.e. Android 4.0.3 (API 15) and select all things under Android 3.0 (API 11) or keeping Android 4.0.3 will be OK for Android 3.I know there are tutorials for Android 4.0.3 on Web so why should i go for Android 3 because i find it easy through books and i got Android 3 here in my place and still no Android 4. So what should i do?
You can install everything. I would recommend to install the API level you want to develop for. But it doesn't hurt (but wastes disk space) to install everything.
Sidenote: Android 3.0 is for tablets, 2.x for older and 4.x for the latest Android Smartphone devices.
You should select the API level that you will target. For example, I am writing an application for API level 7 (Android 2.1.x), so I've got that version installed on my machine. Of course, you can have more than one API level installed, so it is safe to install any combination (for example 3.0.x and 4.0.4 simultaneously - see last paragraph for the reason).
Once you've got a few API levels installed, Eclipse will allow you to change the target API for your project to any of the versions you have installed. The same applies for the command-line project creation.
There is actually one good use-case for installing a version newer than the one you are targeting in addition to the one you use: testing. You can create an emulation environment for a newer version of the API to ensure that your application does not crash and burn when the API levels do not match. If we were to extend my above example, a sensible set of levels to install is 3.0.x, 3.2, and 4.0.4. You can target the initial release of Honeycomb (unless you need anything from the later versions), and test with both the latest Honeycomb and Ice Cream Sandwitch.

Categories

Resources