flutter / flutter/devtools

Deep link validator fails to load & validate links

オープン
#9,254 コメント 3 件 リアクション 4 件 担当者 1 名 @chunhtai が担当を希望しています GitHub で見る
P2 screen: deep links
主要言語
Dart
スター
1.7k
フォーク
404
平均マージ
6日 17時間
マージ済み PR(30日)
18

説明

<-- Please describe your problem here. Be sure to include repro steps. -->

1. Create a file ".env" at the root path of your project
```
{
"APPLICATION_ID": "com.my.app.id"
}
```

2. Edit your android/app/build.gradle file with this after the plugin section :
```
def dartEnvironmentVariables = [];
if (project.hasProperty("dart-defines")) {
dartEnvironmentVariables = project.property("dart-defines")
.split(',')
.collectEntries { entry ->
def pair = new String(entry.decodeBase64(), "UTF-8").split("=")
[(pair.first()): pair.last()]
}
}
```
Still on the build.gradle file, edit the application id defaultConfig like that :
```
defaultConfig {
applicationId dartEnvironmentVariables.APPLICATION_ID
...
}
```

3. Verify that your application is working well using "--dart-define-from-file" on your run command. Here an example with a custom launch config for VSCode if you are using that IDE (.launch.json file)
```
{
"name": "Android - DEV",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
"toolArgs": [
"--dart-define-from-file", ".env"
]
}
```

Result: Unable to load deep link validator tool.

Reference screen shots:

![Image](https://github.com/user-attachments/assets/c93c4ef8-e36d-4f62-ab18-6881a405ff65)

___
**DevTools version**: 2.40.2

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。