DevEco Studio在模拟器中改变运行的 ets 文件
新建的 ets 文件,想让 previewer 里运行这个 ets 文件怎么做。
entry\src\main\ets\entryability\EntryAbility.ets
windowStage.loadContent('pages/Index', (err) => {将 'pages/Index' 改为你的 ets 路径src/main/resources/base/profile/main_pages.json 配置白名单,不然运行了也是白屏
{"src": ["pages/Index"]
}添加你的 ets 文件路径改完main_pages.json文件后提示
core configuration attributes have changed since last project sync.A project sync may be necessary for the IDE to work properly. Sync Now
点击 Sync Now,不然不生效。
或是点击
File 菜单=》Sync and Refresh Project
