我的应用程序在我的真实设备上运行良好,但在模拟器和其他设备上无法运行



我的应用程序在我的真实设备上运行良好,但她无法在模拟器和其他设备上运行,除了我的设备,我不知道为什么。

当我编写的应用程序仅在我的手机上工作并且一切都很好时,但是当我尝试在另一部手机或模拟器中检查该应用程序时,它不起作用。

这是我的清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.matan_gesta.gestamain">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".GestaMainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <service android:name=".GPS_Service"
        android:enabled="true"
        android:exported="true"/>
    <activity
        android:name=".Google_Gesta"
        android:label="@string/title_activity_google__gesta"
        android:theme="@style/AppTheme.NoActionBar" />
    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/facebook_app_id" />
    <activity
        android:name="com.facebook.FacebookActivity"
        android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
        android:label="Gesta" />
    <activity
        android:name="com.facebook.CustomTabActivity"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="@string/fb_login_protocol_scheme" />
        </intent-filter>
    </activity>
    <activity
        android:name=".Facebook_login"
        android:label="@string/title_activity_facebook_login"
        android:theme="@style/AppTheme.NoActionBar" />
</application>

日志猫的错误:

01-19 14:02:10.777 5387-6114/? E/Gmail.LabelManager: Unable to get label ^sq_ig_i_personal for account account:21453719 01-19 14:02:10.777 5387-6114/? E/Gmail: Couldn't find label: ^sq_ig_i_personal 01-19 14:02:10.824 2003-2003/? E/BluetoothAdapter: Bluetooth binder is null 01-19 14:02:11.134 2485-6127/? E/AccountsChangedIntentOp: exception while subscribe: java.util.concurrent.TimeoutException: Waited 6000 milliseconds for awgr@2e3c018[status=PENDING] 01-19 14:02:11.420 2003-2003/? E/BluetoothAdapter: Bluetooth binder is null 01-19 14:02:11.428 1616-1628/? E/SyncManager: Job params not found for 109473 01-19 14:02:11.820 2003-2324/? E/ctxmgr: [NetworkUtil]No active synchronizable contexts. 01-19 14:02:12.557 2003-2324/? E/Auth: [GoogleAccountDataServiceImpl] getToken() -> BAD_AUTHENTICATION. Account: , App: com.google.android.gms, Service: oauth2:https://www.googleapis.com/auth/contextcontroller fbl: Long live credential not available. at fbm.b(:com.google.android.gms@11951470:10) at fbm.a(:com.google.android.gms@11951470:50) at ezw.a(:com.google.android.gms@11951470:37) at gnu.a(:com.google.android.gms@11951470:7) at gnu.a(:com.google.android.gms@11951470:155) at gmu.a(:com.google.android.gms@11951470:2) at gms.a(:com.google.android.gms@11951470:17) at gms.a(:com.google.android.gms@11951470:6) at cob.a(:com.google.android.gms@11951470:25) at cob.a(:com.google.android.gms@11951470:80) at ewz.a(:com.google.android.gms@11951470:6) at ewy.a(:com.google.android.gms@11951470:2) at ewy.e(:com.google.android.gms@11951470:6) at ewy.d(:com.google.android.gms@11951470:1) at eww.b(:com.google.android.gms@11951470:1) at mqa.a(:com.google.android.gms@11951470:1) at mon.a(:com.google.android.gms@11951470:3) at dfo.a(:com.google.android.gms@11951470:54) at dax.run(:com.google.android.gms@11951470:2) at dav.handleMessage(:com.google.android.gms@11951470:3) at muq.run(:com.google.android.gms@11951470:6) at mvc.run(:com.google.android.gms@11951470:26) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at nak.run(:com.google.android.gms@11951470) at java.lang.Thread.run(Thread.java:761) 01-19 14:02:13.117 2485-2748/? E/ProcessCheckinRequest: CheckinNowTaskTag : Checkin Succeeded: https://android.clients.google.com/checkin (request #1): 01-19 14:02:13.531 2003-2324/? E/ctxmgr: [BaseServerTask]Server task (WriteInterestRecordTask) got error statusCode=-1. com.android.volley.VolleyError: Unable to obtain auth token - is the device online? at dfo.a(:com.google.android.gms@11951470:62) at dax.run(:com.google.android.gms@11951470:2) at dav.handleMessage(:com.google.android.gms@11951470:3) at muq.run(:com.google.android.gms@11951470:6) at mvc.run(:com.google.android.gms@11951470:26) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at nak.run(:com.google.android.gms@11951470) at java.lang.Thread.run(Thread.java:761) 01-19 

如果您可以发布更多详细信息,例如模拟器API版本以及有关您的真实设备的详细信息,那就更好了。由于在不同 API 版本中提供权限的方式不同,可能会发生此类事情。

您正在使用在模拟器上不起作用的位置引用。

最新更新