gpt4 book ai didi

java - wifiManager.getScanResults() 返回 0

转载 作者:太空宇宙 更新时间:2023-11-03 10:58:12 26 4
gpt4 key购买 nike

我想开发一个软件,在后台使用处理程序线程扫描可用的 wifi 网络。问题是当我使用 handler.postDelayed() 时,WifiManager.getScanResults() 在正常情况下同时返回 0。

这些是运行时权限:

@Override
protected void onResume() {
super.onResume();
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
{
if(checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)
{
requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, 87);
}
}
}

还有我的处理程序:

handler.postDelayed(new Runnable() {
@Override
public void run() {
counter++;
scanWifi();
scannWifiInterval();
if(counter==5){
sum/=5;
textView2.setText(Integer.toString(sum));
}
}
},timeoutSecondGenerator());

和 scanWifi 方法:

private void scanWifi() {
wifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);

if (!wifiManager.isWifiEnabled()) {
Toast.makeText(this, "WiFi is disabled ... We need to enable it", Toast.LENGTH_LONG).show();
wifiManager.setWifiEnabled(true);

}
arrayList.clear();
registerReceiver(wifiReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
wifiManager.startScan();

Toast.makeText(this, "Scanning WiFi ...", Toast.LENGTH_SHORT).show();
}

BroadCastReciever:

BroadcastReceiver wifiReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) {


results = wifiManager.getScanResults();
unregisterReceiver(this);



for(int i=0;i<results.size();i++){

}
for (ScanResult scanResult : results) {
if (scanResult.SSID.equals(networkSSID)) {
sum+=scanResult.level;
textView.setText(Integer.toString(scanResult.level));

}


}

}
}
};

日志:

09-16 16:36:47.384 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:36:47.454 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:36:47.454 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:36:47.454 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:36:47.454 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:36:47.454 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:36:47.454 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:36:47.474 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:36:47.474 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:36:47.474 2536-2536/? E/ViewRootImpl: mStopped=false mHasWindowFocus=false mPausedForTransition=false
09-16 16:37:02.169 1478-1849/? E/WifiStateMachine: result: -1266999764, Moved BSSID: 80:2a:a8:9a:ea:da
09-16 16:37:02.269 2681-2692/? E/Auth: [GoogleAccountDataServiceImpl] getToken() -> NETWORK_ERROR. Account: <ELLIDED:905778253>, App: com.google.android.googlequicksearchbox, Service: oauth2:https://www.googleapis.com/auth/googlenow
pez: Error when calling server.
at gnx.c(:com.google.android.gms@13280016@13.2.80 (040304-211705629):279)
at gnx.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):24)
at gnx.b(:com.google.android.gms@13280016@13.2.80 (040304-211705629))
at gmi.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):34)
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):13)
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):148)
at iet.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):16)
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6)
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):33)
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):69)
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):254)
at wwt.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3)
at cgv.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):5)
at android.os.Binder.transact(Binder.java:387)
at djf.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3)
at android.os.Binder.execTransact(Binder.java:453)
Caused by: javax.net.ssl.SSLHandshakeException: Connection closed by peer
at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms@13280016@13.2.80 (040304-211705629):8)
at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@13280016@13.2.80 (040304-211705629):15)
at com.google.android.gms.common.net.SSLCertificateSocketFactory.verifyHostname(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at com.google.android.gms.common.net.SSLCertificateSocketFactory.createSocket(:com.google.android.gms@13280016@13.2.80 (040304-211705629):8)
at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:188)
at com.android.okhttp.Connection.connect(Connection.java:1324)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:1412)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:131)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:481)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:462)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:368)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:476)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:118)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:249)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java)
at yod.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):32)
at imu.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):1)
at gnj.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6)
at gnj.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at gnx.c(:com.google.android.gms@13280016@13.2.80 (040304-211705629):109)
at gnx.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):24) 
at gnx.b(:com.google.android.gms@13280016@13.2.80 (040304-211705629)) 
at gmi.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):34) 
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):13) 
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):148) 
at iet.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2) 
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):16) 
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6) 
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):33) 
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):69) 
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):254) 
at wwt.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3) 
at cgv.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):5) 
at android.os.Binder.transact(Binder.java:387) 
at djf.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3) 
at android.os.Binder.execTransact(Binder.java:453) 
09-16 16:37:02.419 17764-17764/? E/Zygote: no v2
09-16 16:37:02.489 2681-17697/? E/Auth: [GoogleAccountDataServiceImpl] getToken() -> NETWORK_ERROR. Account: <ELLIDED:905778253>, App: com.google.android.googlequicksearchbox, Service: oauth2:https://www.googleapis.com/auth/googlenow
pez: Error when calling server.
at gnx.c(:com.google.android.gms@13280016@13.2.80 (040304-211705629):279)
at gnx.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):24)
at gnx.b(:com.google.android.gms@13280016@13.2.80 (040304-211705629))
at gmi.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):34)
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):13)
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):148)
at iet.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):16)
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6)
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):33)
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):69)
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):254)
at wwt.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3)
at cgv.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):5)
at android.os.Binder.transact(Binder.java:387)
at djf.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3)
at android.os.Binder.execTransact(Binder.java:453)
Caused by: javax.net.ssl.SSLHandshakeException: Connection closed by peer
at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms@13280016@13.2.80 (040304-211705629):8)
at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@13280016@13.2.80 (040304-211705629):15)
at com.google.android.gms.common.net.SSLCertificateSocketFactory.verifyHostname(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at com.google.android.gms.common.net.SSLCertificateSocketFactory.createSocket(:com.google.android.gms@13280016@13.2.80 (040304-211705629):8)
at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:188)
at com.android.okhttp.Connection.connect(Connection.java:1324)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:1412)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:131)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:481)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:462)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:368)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:476)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:118)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:249)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java)
at yod.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):32)
at imu.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):1)
at gnj.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6)
at gnj.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at gnx.c(:com.google.android.gms@13280016@13.2.80 (040304-211705629):109)
at gnx.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):24) 
at gnx.b(:com.google.android.gms@13280016@13.2.80 (040304-211705629)) 
at gmi.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):34) 
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):13) 
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):148) 
at iet.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2) 
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):16) 
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6) 
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):33) 
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):69) 
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):254) 
at wwt.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3) 
at cgv.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):5) 
at android.os.Binder.transact(Binder.java:387) 
at djf.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3) 
at android.os.Binder.execTransact(Binder.java:453) 
09-16 16:37:02.499 2400-17412/? E/VelvetNetworkClient: Failed to get auth token
09-16 16:37:02.589 2400-17412/? E/UpdateGcmReg: Network error while trying to register for GCM updates
09-16 16:37:03.320 2681-4954/? E/Auth: [GoogleAccountDataServiceImpl] getToken() -> NETWORK_ERROR. Account: <ELLIDED:905778253>, App: com.google.android.instantapps.supervisor, Service: oauth2:https://www.googleapis.com/auth/playatoms
pez: Error when calling server.
at gnx.c(:com.google.android.gms@13280016@13.2.80 (040304-211705629):279)
at gnx.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):24)
at gnx.b(:com.google.android.gms@13280016@13.2.80 (040304-211705629))
at gmi.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):34)
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):13)
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):148)
at iet.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):16)
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6)
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):33)
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):69)
at gjc.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):4)
at gjb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at gjb.c(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6)
at gja.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):1)
at gkz.getAuthToken(:com.google.android.gms@13280016@13.2.80 (040304-211705629):8)
at android.accounts.AbstractAccountAuthenticator$Transport.getAuthToken(AbstractAccountAuthenticator.java:214)
at android.accounts.IAccountAuthenticator$Stub.onTransact(IAccountAuthenticator.java:113)
at android.os.Binder.transact(Binder.java:387)
at djf.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3)
at android.os.Binder.execTransact(Binder.java:453)
Caused by: javax.net.ssl.SSLHandshakeException: Connection closed by peer
at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms@13280016@13.2.80 (040304-211705629):8)
at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@13280016@13.2.80 (040304-211705629):15)
at com.google.android.gms.common.net.SSLCertificateSocketFactory.verifyHostname(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at com.google.android.gms.common.net.SSLCertificateSocketFactory.createSocket(:com.google.android.gms@13280016@13.2.80 (040304-211705629):8)
at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:188)
at com.android.okhttp.Connection.connect(Connection.java:1324)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:1412)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:131)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:481)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:462)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:368)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:476)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:118)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:249)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java)
at yod.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):32)
at imu.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):1)
at gnj.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6)
at gnj.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2)
at gnx.c(:com.google.android.gms@13280016@13.2.80 (040304-211705629):109)
at gnx.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):24) 
at gnx.b(:com.google.android.gms@13280016@13.2.80 (040304-211705629)) 
at gmi.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):34) 
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):13) 
at ift.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):148) 
at iet.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2) 
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):16) 
at ieq.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6) 
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):33) 
at dhb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):69) 
at gjc.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):4) 
at gjb.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):2) 
at gjb.c(:com.google.android.gms@13280016@13.2.80 (040304-211705629):6) 
at gja.a(:com.google.android.gms@13280016@13.2.80 (040304-211705629):1) 
at gkz.getAuthToken(:com.google.android.gms@13280016@13.2.80 (040304-211705629):8) 
at android.accounts.AbstractAccountAuthenticator$Transport.getAuthToken(AbstractAccountAuthenticator.java:214) 
at android.accounts.IAccountAuthenticator$Stub.onTransact(IAccountAuthenticator.java:113) 
at android.os.Binder.transact(Binder.java:387) 
at djf.onTransact(:com.google.android.gms@13280016@13.2.80 (040304-211705629):3) 
at android.os.Binder.execTransact(Binder.java:453) 
09-16 16:37:03.350 17542-17787/? E/Isotope: UID: [10104] PID: [17542] HygieneTask : GetArchiveDownload RPC failed
eer: UNAUTHENTICATED
at bai.b(PG:6)
at baf.call(PG:9)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at bke.run(PG)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.io.IOException: NetworkError
at android.accounts.AccountManager.convertErrorToException(AccountManager.java:2138)
at android.accounts.AccountManager.-wrap0(AccountManager.java)
at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1996)
at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69)
at android.os.Binder.execTransact(Binder.java:453)
09-16 16:37:03.350 17542-17789/? E/Isotope: UID: [10104] PID: [17542] HygieneTaskService : Archive Prefetching failed
eer: UNAUTHENTICATED
at bai.b(PG:6)
at baf.call(PG:9)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at bke.run(PG)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.io.IOException: NetworkError
at android.accounts.AccountManager.convertErrorToException(AccountManager.java:2138)
at android.accounts.AccountManager.-wrap0(AccountManager.java)
at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1996)
at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69)
at android.os.Binder.execTransact(Binder.java:453)
09-16 16:37:03.370 2681-14277/? E/NetworkScheduler: Invalid component specified.
09-16 16:37:03.390 2681-14277/? E/NetworkScheduler: Invalid component specified.
09-16 16:37:03.420 1478-1632/? E/NativeLibraryHelper: Failed to load assets verifier: 0
09-16 16:37:03.700 1478-1632/? E/NativeLibraryHelper: Failed to load assets verifier: 0

继续扫描但什么也没发现

minSdkVersion 17targetSdkVersion 28

我在 samsung galaxy s9 上运行它

如果有人回答,我将不胜感激。

最佳答案

终于找到问题所在了。我刚刚将 targetSdkVersion 从 28 更改为 22,它成功了!我认为在某些 Android 设备上运行时权限不是答案,您还需要在 list 文件中设置它,而在 sdk 28 程序中只设置运行时权限。

关于java - wifiManager.getScanResults() 返回 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52353577/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com