android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.inten...

簡述下一鍵跳轉(zhuǎn)至指定網(wǎng)站的錯(cuò)誤。

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=XXX:xxxxx },

這個(gè)其實(shí)是谷歌版本不再支持http了,而是https,所以你跳轉(zhuǎn)的網(wǎng)址一定要加上https.

? Intent intent=new Intent();

? intent.setAction("android.intent.action.VIEW");

? String netaddress=editurl.getText().toString();

? Uri content_url =Uri.parse("https://"+netaddress);

? intent.setData(content_url);

? startActivity(intent);

另外說下,官網(wǎng)提醒說可以在mannifest文件中,在<application/>中加上那句:android:usesCleartextTraffic="true",按照實(shí)際操作結(jié)果,這個(gè)可能沒用。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容