【发布时间】:2018-06-22 07:13:16
【问题描述】:
所以我有一个使用 ionic-plugin-deeplinks 插件的 iOS/Android Ionic Cordova 应用程序。当 AndroidManifest.xml 中包含以下内容时,该插件无法正常工作:
<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:host="synapticforce.com" android:pathPrefix="/" android:scheme="https" />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
</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="yourekamobile" />
</intent-filter>
但是,每当我 ionic prepare 将我的修复覆盖回原来的非正常方式时。我试图在父级config.xml 中更改cordova 以及plugin.xml parent/plugins/ionic-plugin-deeplinks 文件夹中的某些内容,但它仍会被覆盖为原来的损坏方式。然后我进入parent/platforms/android/android.json 并将原始版本的编写位置更改为我的版本,并且它始终构建良好。
所以我很高兴它有效,但我的问题是它为什么有效? android.json 是如何构建的?编辑该文件是正确的做法,还是从中提取了一些我应该编辑的东西?
【问题讨论】:
标签: android cordova cordova-plugins deep-linking