有没有会 android 的大佬,给我整晕了 我配置了 AppLinks 一开始在我自己的服务器部署的,跳转一切正常。换到公司的(内网)发现跳转失败,当我再换回我的测试的发现我自己的也跳转不了了。一点链接就 浏览器 nginx 404 页面。不能跳到 APP 上。App Links Assistant 上验证工具也能通过,但就是没法跳转到 APP 。Android API 26 ( Android 8 ) 开发测试机 Pixel6 Android14 我认为配置了<intent-filter> 和在域名服务器上部署了证书后应该就能跳转才对。不知道是哪里错了。。 还有就是有没有比较好的 Android 开发社区,大佬们推荐一下! 下面是我的代码 AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.VIBRATE" /> <application android:allowBackup="true" android:dataExtractiOnRules="@xml/data_extraction_rules" android:fullBackupCOntent="@xml/backup_rules" android:icon="@mipmap/logo" android:roundIcon="@mipmap/logo_round" android:label="@string/roll" android:supportsRtl="true" android:theme="@style/Theme.Hello" tools:targetApi="31"> <activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/Theme.Hello"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" > <data android:scheme="https" /> <data android:host="tw.eekda.com" /> <data android:pathPrefix="/open" /> </intent-filter> </activity> </application> </manifest> debug 证书地址: https://tw.eekda.com/.well-known/assetlinks.json
这是我跳转 url 的 Button 代码
openApp(){ const isAndroid = /Android/i.test(navigator.userAgent); if (isAndroid) { const uurl = `https://tw.eekda.com/open`; // 尝试打开 APP 或者跳转到应用商店 window.location.href = uurl; } else { // 如果是其他平台(如 iOS ) alert("只支持 android") } }, 