android - 2.3.3 app not working in higher versions -


i made small app displays text , move in between pages made 2.3.3 sdk 10 version when install in 4.4.1 phones having compatibility issues saying incompatible version

package com.top20e1; import android.app.activity; import android.content.intent; import android.os.bundle; import android.view.view; import android.view.window; import android.widget.button;  public class topactivity extends activity { /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     requestwindowfeature(window.feature_no_title);     setcontentview(r.layout.main);   //  requestwindowfeature(window.feature_no_title);     final button switchact =(button)findviewbyid(r.id.button1);     switchact.setonclicklistener(new view.onclicklistener() {          @override         public void onclick(view view) {             intent act2 = new             intent(view.getcontext(),secondactivity.class);             startactivity(act2);          }     });       }} 

this typical layout in app

    <?xml version="1.0" encoding="utf-8"?>  <scrollview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" >    <linearlayout     android:id="@+id/linearlayout1"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical"     android:background="@drawable/wood" >      <textview         android:id="@+id/textview1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:textcolor="#171616"         android:text="management color"         android:textappearance="?android:attr/textappearancelarge" />        <relativelayout         android:id="@+id/relativelayout1"         android:layout_width="match_parent"         android:layout_height="wrap_content" >            <button         android:id="@+id/button2"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="previous" />      <button         android:id="@+id/button1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentright="true"         android:layout_alignparenttop="true"         android:text="next" />      </relativelayout>  </linearlayout>   </scrollview> 

and manifest

 <?xml version="1.0" encoding="utf-8"?>  <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installlocation="preferexternal" package="com.top20e1" android:versioncode="1" android:versionname="1.0"  >  <uses-sdk android:minsdkversion="10" />  <application     android:icon="@drawable/bg"     >     <activity         android:label="@string/app_name"         android:name=".top20" >         <intent-filter >             <action android:name="android.intent.action.main" />              <category android:name="android.intent.category.launcher" />         </intent-filter>     </activity>      <activity      android:name="secondactivity"      android:label="@string/app_name">       </activity>       <activity            android:name="thirdactivity"          ></activity>       <activity            android:name="fourthactivity"          ></activity>       <activity            android:name="fiveactivity"          ></activity>       <activity            android:name="sixactivity"          ></activity>       <activity            android:name="sevenactivity"          ></activity>        <activity            android:name="eightactivity"          ></activity>         <activity            android:name="nineactivity"           ></activity>          <activity            android:name="tenactivity"          ></activity>           <activity            android:name="elevenactivity"          ></activity>            <activity            android:name="twevelactivity"          ></activity>             <activity            android:name="thirteenactivity"          ></activity> <activity            android:name="fourteenactivity"          ></activity>           <activity            android:name="fifteenactivity"          ></activity>            <activity            android:name="sixteenactivity"          ></activity>       <activity            android:name="seventeenactivity"          ></activity>        <activity            android:name="eighteenactivity"          ></activity> <activity            android:name="nineteenactivity"          ></activity>           <activity            android:name="twentyactivity"           ></activity>  </application>  </manifest> 

this should work, add on android manifest file.

 <uses-sdk android:maxsdkversion="19" /> 

4.4.1 think kitkat if want app compatible latest version far lollipop make maxsdkversion 22.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -