简体   繁体   English

android服务可在2.2版中使用,但在更高版本中会失败

[英]android service works in version 2.2 but fails in higher versions

Greetings guys and i apologies in advance if i seem to stumble here but ia pretty new to android development 如果我似乎在这里绊倒了,我和我提前道歉,但是对于android开发来说这是很新的

the scenario is i have build a simple gps tracking app. 场景是我建立了一个简单的GPS追踪应用程式。 essentially the user can click a panic button or a checking button or sms to active a service. 基本上,用户可以单击紧急按钮或检查按钮或短信来激活服务。 everything works fine in version 2.2 which is what i targeted in my build but when tested on a htc running 2.3.4 the app crashes as soon as any function calls the service. 在2.2版中一切正常,这是我构建的目标,但是在运行2.3.4的htc上进行测试时,只要有任何函数调用该服务,应用程序就会崩溃。

in short the service checks the database for the users pin in the database here is Pinbox_db it then gets the gps position and once received issues a http call to the web service to post the long and lat of the device 简而言之,该服务会检查数据库中是否存在用户pin,该数据库中的pin是Pinbox_db,然后它将获取gps位置,一旦接收到,就会向Web服务发出http调用以发布设备的长号和纬度

again i am sorry if this seems trivial to you more experienced developers but i am in very new grounds and appreciate your feedback 再次对不起,如果这对于您来说经验丰富的开发人员来说微不足道,但是我处于新的领域,感谢您的反馈

here is my service code 这是我的服务代码

  package com.artgraven.misafety;


  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.List;

  import org.apache.http.HttpResponse;
  import org.apache.http.NameValuePair;
  import org.apache.http.client.ClientProtocolException;
  import org.apache.http.client.HttpClient;   
  import org.apache.http.client.entity.UrlEncodedFormEntity;
  import org.apache.http.client.methods.HttpPost;
  import org.apache.http.impl.client.DefaultHttpClient;
  import org.apache.http.message.BasicNameValuePair;

  import android.app.Service;
  import android.content.Context;
  import android.content.Intent;
  import android.location.Location;
  import android.location.LocationManager;
  import android.net.ConnectivityManager;
  import android.os.Bundle;
  import android.os.IBinder;
  import android.telephony.TelephonyManager;
  import android.util.Log;
  import android.widget.Toast;


  public class Bg_process extends Service {
private static final String TAG = "BOOMBOOMTESTGPS";
private LocationManager mLocationManager = null;
private static final int LOCATION_INTERVAL = 1500;
private static final float LOCATION_DISTANCE = 20f;
public static String b_c_long;
public static String b_c_lat;
public static String alert_pin = "", alert_type ="undefined", alert_device ="android", alert_imei="32154",alert_sim_serial="0796768445";
private Pinbox_db entry = new Pinbox_db(Bg_process.this);
public static String recordSet = "PIN";

private class LocationListener implements android.location.LocationListener{
    Location mLastLocation;
    public LocationListener(String provider)
    {
        Log.e(TAG, "LocationListener " + provider);
        mLastLocation = new Location(provider);

    }
    public void onLocationChanged(Location location)
    {
        Log.e(TAG, "onLocationChanged: " + location);
        mLastLocation.set(location);
        String message = String.format(
                "New Location \n Longitude: %1$s \n Latitude: %2$s",
                location.getLongitude(), location.getLatitude());

        Toast.makeText(Bg_process.this, message, Toast.LENGTH_LONG).show();

        b_c_long = Double.toString(location.getLongitude());
        b_c_lat = Double.toString(location.getLatitude());

        postData();

    }
    public void onProviderDisabled(String provider)
    {
        Log.e(TAG, "onProviderDisabled: " + provider);            
    }

    public void onProviderEnabled(String provider)
    {
        Log.e(TAG, "onProviderEnabled: " + provider);
    }

    public void onStatusChanged(String provider, int status, Bundle extras)
    {
        Log.e(TAG, "onStatusChanged: " + provider);
    }
} 
LocationListener[] mLocationListeners = new LocationListener[] {
        new LocationListener(LocationManager.GPS_PROVIDER),
        new LocationListener(LocationManager.NETWORK_PROVIDER)

};


@Override
public IBinder onBind(Intent arg0)
{
    return null;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId)
{
    Log.e(TAG, "onStartCommand");
     super.onStartCommand(intent, flags, startId);       
    Bundle extras = intent.getExtras();
   // alert_type = intent.getStringExtra("code");
    alert_type = extras.getString("code");


    return START_STICKY;


}
@Override
public void onCreate()
{   
    // get pin
    entry.open();
    recordSet = entry.getPin();
    entry.close();
    alert_pin = recordSet;

    TelephonyManager tm = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);

     ConnectivityManager cm = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);
        if(cm.getActiveNetworkInfo().getTypeName().equals("MOBILE"))
            alert_device = "android:  cellnetwork/3G";
        else if(cm.getActiveNetworkInfo().getTypeName().equals("WIFI"))
            alert_device = "android: wifi";
        else 
            alert_device ="android: na"; 

        alert_sim_serial = tm.getLine1Number();
        alert_imei = tm.getDeviceId();



    Log.e(TAG, "onCreate");
    initializeLocationManager();
    try {
        mLocationManager.requestLocationUpdates(
                LocationManager.NETWORK_PROVIDER, LOCATION_INTERVAL, LOCATION_DISTANCE,
                mLocationListeners[0]);


    } catch (java.lang.SecurityException ex) {
        Log.i(TAG, "fail to request location update, ignore", ex);
    } catch (IllegalArgumentException ex) {
        Log.d(TAG, "network provider does not exist, " + ex.getMessage());
    }
    try {
        mLocationManager.requestLocationUpdates(
                LocationManager.GPS_PROVIDER, LOCATION_INTERVAL, LOCATION_DISTANCE,
                mLocationListeners[1]);
    } catch (java.lang.SecurityException ex) {
        Log.i(TAG, "fail to request location update, ignore", ex);
    } catch (IllegalArgumentException ex) {
        Log.d(TAG, "gps provider does not exist " + ex.getMessage());
    }
}

@Override
public void onDestroy()
{
    Log.e(TAG, "onDestroy");
    super.onDestroy();
    if (mLocationManager != null) {
        for (int i = 0; i < mLocationListeners.length; i++) {
            try {
                mLocationManager.removeUpdates(mLocationListeners[i]);
            } catch (Exception ex) {
                Log.i(TAG, "fail to remove location listners, ignore", ex);
            }
        }
    }
} 
public static void postData() {
    HttpClient httpclient = new DefaultHttpClient();
    HttpPost httppost = new HttpPost("http://www.website.co.za/api/activity_log.php");
    try {
        // Add your data
        List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
        nameValuePairs.add(new BasicNameValuePair("alert_long", b_c_long));
        nameValuePairs.add(new BasicNameValuePair("alert_lat", b_c_lat));
        nameValuePairs.add(new BasicNameValuePair("alert_pin", alert_pin));
        nameValuePairs.add(new BasicNameValuePair("alert_type", alert_type));
        nameValuePairs.add(new BasicNameValuePair("alert_device", alert_device));
        nameValuePairs.add(new BasicNameValuePair("alert_imei", alert_imei));
        nameValuePairs.add(new BasicNameValuePair("alert_sim_serial", alert_sim_serial));
        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

        // Execute HTTP Post Request
        HttpResponse response = httpclient.execute(httppost);

    } catch (ClientProtocolException e) {
        // TODO Auto-generated catch block
    } catch (IOException e) {
        // TODO Auto-generated catch block
    }
}
private void initializeLocationManager() {
    Log.e(TAG, "initializeLocationManager");
    if (mLocationManager == null) {
        mLocationManager = (LocationManager) getApplicationContext().getSystemService(Context.LOCATION_SERVICE);
        Location location = mLocationManager
                .getLastKnownLocation(LocationManager.GPS_PROVIDER);
        if (location != null) {
            String message = String.format(
                    "Current Location \n Longitude: %1$s \n Latitude: %2$s",
                    location.getLongitude(), location.getLatitude());
            Toast.makeText(Bg_process.this, " " + message, Toast.LENGTH_LONG).show();

            b_c_long = Double.toString(location.getLongitude());
            b_c_lat = Double.toString(location.getLatitude());

            postData();

        } else {
            Toast.makeText(Bg_process.this, "current location unavailable",
                    Toast.LENGTH_LONG).show();

        }
    }
}

} 

thank you very much for any feedback in advance 非常感谢您的任何提前反馈

here is the session logCat 这是会话logCat

 11-19 21:15:56.030: E/BOOMBOOMTESTGPS(639): LocationListener gps
 11-19 21:15:56.070: E/BOOMBOOMTESTGPS(639): LocationListener network
 11-19 21:15:56.330: E/BOOMBOOMTESTGPS(639): onCreate
 11-19 21:15:56.330: E/BOOMBOOMTESTGPS(639): initializeLocationManager
 11-19 21:15:56.430: E/BOOMBOOMTESTGPS(639): onStartCommand
 11-19 21:15:56.520: E/BOOMBOOMTESTGPS(639): onLocationChanged: Location[mProvider=gps,mTime=1353268800000,mLatitude=37.422005,mLongitude=-122.084095,mHasAltitude=true,mAltitude=0.0,mHasSpeed=false,mSpeed=0.0,mHasBearing=false,mBearing=0.0,mHasAccuracy=false,mAccuracy=0.0,mExtras=Bundle[mParcelledData.dataSize=4]]
 11-19 21:15:56.810: E/AndroidRuntime(639): FATAL EXCEPTION: main
 11-19 21:15:56.810: E/AndroidRuntime(639): android.os.NetworkOnMainThreadException
 11-19 21:15:56.810: E/AndroidRuntime(639):     at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at java.net.InetAddress.getAllByName(InetAddress.java:220)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at com.artgraven.misafety.Bg_process.postData(Bg_process.java:188)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at com.artgraven.misafety.Bg_process$LocationListener.onLocationChanged(Bg_process.java:62)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:234)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:167)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:183)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at android.os.Handler.dispatchMessage(Handler.java:99)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at android.os.Looper.loop(Looper.java:137)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at android.app.ActivityThread.main(ActivityThread.java:4424)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at java.lang.reflect.Method.invokeNative(Native Method)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at java.lang.reflect.Method.invoke(Method.java:511)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
 11-19 21:15:56.810: E/AndroidRuntime(639):     at dalvik.system.NativeStart.main(Native Method)
 11-19 21:16:05.839: E/BOOMBOOMTESTGPS(653): LocationListener network
 11-19 21:16:05.909: E/BOOMBOOMTESTGPS(653): onCreate
 11-19 21:16:05.909: E/BOOMBOOMTESTGPS(653): initializeLocationManager
 11-19 21:16:06.019: E/AndroidRuntime(653): FATAL EXCEPTION: main
 11-19 21:16:06.019: E/AndroidRuntime(653): java.lang.RuntimeException: Unable to create service com.artgraven.misafety.Bg_process: android.os.NetworkOnMainThreadException
 11-19 21:16:06.019: E/AndroidRuntime(653):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2263)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at android.app.ActivityThread.access$1600(ActivityThread.java:123)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at android.os.Handler.dispatchMessage(Handler.java:99)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at android.os.Looper.loop(Looper.java:137)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at android.app.ActivityThread.main(ActivityThread.java:4424)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at java.lang.reflect.Method.invokeNative(Native Method)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at java.lang.reflect.Method.invoke(Method.java:511)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at dalvik.system.NativeStart.main(Native Method)
 11-19 21:16:06.019: E/AndroidRuntime(653): Caused by: android.os.NetworkOnMainThreadException
 11-19 21:16:06.019: E/AndroidRuntime(653):     at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at java.net.InetAddress.getAllByName(InetAddress.java:220)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at com.artgraven.misafety.Bg_process.postData(Bg_process.java:188)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at com.artgraven.misafety.Bg_process.initializeLocationManager(Bg_process.java:211)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at com.artgraven.misafety.Bg_process.onCreate(Bg_process.java:134)
 11-19 21:16:06.019: E/AndroidRuntime(653):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)
 11-19 21:16:06.019: E/AndroidRuntime(653):     ... 10 more

this updated logcat is from a higher api version (15) after implementing the suggested answer the problem was solved on emulators but when testing on devices the following error occurs 在实施建议的答案后,此更新的logcat来自更高版本的api版本(15),该问题已在仿真器上解决,但在设备上进行测试时出现以下错误

12-08 18:12:47.360: W/dalvikvm(21432): threadid=1: thread exiting with uncaught exception (group=0x401b1760)
12-08 18:12:47.360: E/AndroidRuntime(21432): FATAL EXCEPTION: main
12-08 18:12:47.360: E/AndroidRuntime(21432): java.lang.RuntimeException: Unable to create service com.artgraven.specialopstech.Bg_process: android.os.NetworkOnMainThreadException
12-08 18:12:47.360: E/AndroidRuntime(21432):    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2049)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at android.app.ActivityThread.access$2500(ActivityThread.java:122)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1059)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at android.os.Looper.loop(Looper.java:132)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at android.app.ActivityThread.main(ActivityThread.java:4028)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at java.lang.reflect.Method.invokeNative(Native Method)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at java.lang.reflect.Method.invoke(Method.java:491)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at dalvik.system.NativeStart.main(Native Method)
12-08 18:12:47.360: E/AndroidRuntime(21432): Caused by: android.os.NetworkOnMainThreadException
12-08 18:12:47.360: E/AndroidRuntime(21432):    at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1077)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at java.net.InetAddress.lookupHostByName(InetAddress.java:477)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at java.net.InetAddress.getAllByNameImpl(InetAddress.java:277)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at java.net.InetAddress.getAllByName(InetAddress.java:249)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at com.artgraven.specialopstech.Bg_process.postData(Bg_process.java:192)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at com.artgraven.specialopstech.Bg_process.initializeLocationManager(Bg_process.java:215)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at com.artgraven.specialopstech.Bg_process.onCreate(Bg_process.java:138)
12-08 18:12:47.360: E/AndroidRuntime(21432):    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2039)
12-08 18:12:47.360: E/AndroidRuntime(21432):    ... 10 more

More recent OS versions throw errors when they detect that you're making a bad "user experience" mistake. 当最新的OS版本检测到您犯了严重的“用户体验”错误时,就会引发错误。 Doing network traffic on the UI thread is one of them, which is what your logcat is showing. 在UI线程上进行网络通信就是其中之一,这就是您的logcat显示的内容。 You can avoid this by putting that traffic in a separate thread: 您可以通过把该流量在一个单独的线程避免这种情况:

Thread thread = new Thread(new Runnable() {
    public void run() {
        // Net traffic here
    }
});
thread.start();

You could call your entire postData() on that thread like this: 您可以在该线程上调用整个postData() ,如下所示:

public void onLocationChanged(Location location)
{
    Log.e(TAG, "onLocationChanged: " + location);
    mLastLocation.set(location);
    String message = String.format(
            "New Location \n Longitude: %1$s \n Latitude: %2$s",
            location.getLongitude(), location.getLatitude());

    Toast.makeText(Bg_process.this, message, Toast.LENGTH_LONG).show();

    b_c_long = Double.toString(location.getLongitude());
    b_c_lat = Double.toString(location.getLatitude());

    Thread thread = new Thread(new Runnable() {
      public void run() {
        postData();
      }
    });
    thread.start();
}

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将Android 2.2应用程序迁移到更高版本 - How to migrate an Android 2.2 application to higher versions Android应用制作2.2版本,但不兼容2.2+版本 - Android app making 2.2 version but not compatible for 2.2+ versions Android 2.2应用程序是否适用于运行3.0及更高版本的平板电脑 - Will Android 2.2 apps work on Tablets running on 3.0 and higher version Android:文件outputstream方法适用于Android 5及更低版本,但不适用于6及更高版本 - Android: file outputstream method works for android versions 5 and lower but not for 6 and higher 如何处理android中从较低版本(2.2)到ICS(3.2)及更高版本的配置更改 - how to handle configuration change in android from lower versions(2.2) to ICS(3.2) and higher Android 2.2及更高版本中的外键 - Foreign keys in android 2.2 and higher 在应用程序上针对不同的Android版本创建-在较低版本中可用,仅在较高版本中导入 - creating on app for different Android version - available on lower versions with imports only in higher version 应用程序在更高版本的Android上崩溃 - App crashes on higher versions of android Datepicker在更高版本的android中不起作用 - Datepicker not working in higher versions of android TabHost不适用于更高版本的Android - TabHost not working with higher Android Versions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM