Understanding Android Api Levels
I have installed the android system using an Udacity Tutorial and then I wrote my first Hello World Application with their help. It was great to see my first app running – it gives you courage to go further in the Android world. Everything went fine until I got an error saying: Nou resource found that matches the given name.
This is my xml code for layout:
TextView android:id="@+id/first_text"
android:text="Jesus is Risen!"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_above="@id/living_word"
android:padding="20dp"
android:textSize="36sp"
android:fontFamily="sans-serif-light"
android:background="#000000ff"
android:textColor="@android:color/white"
TextView android:id="@+id/living_word"
android:text="I am the light of the world: he that follows me shall not walk in darkness, but shall have the light of life"
As I was trying to position relative layouts and relate one view to another using ids, I got an error when compiling. In the editor everything was fine.
Error:(22, 31) No resource found that matches the given name (at 'layout_above' with value '@id/living_word').
The problem is that the compiler uses a different version of the SDK and the editor is unaware of this.
A solution is us the right Android API and SKD Tools:
Here is a description of the Android versions and API Levels:
https://developer.xamarin.com/guides/android/application_fundamentals/understanding_android_api_levels/
Each android devices supports exactly one version of API Level, identifying the libraries which are to be used for coding:
– the Target API level specifies the desired phone for the application
– the Minimum API level specifies the minimum API that can support the application