【发布时间】:2021-08-22 06:40:05
【问题描述】:
当我将 Manifest 文件和具有设置pendingIntent 的函数的控制器放在同一目录中以显示manifest 文件中定义的对话框时,可以成功触发对话框。但是在我将它们分开到不同的目录后,对话框不再被触发。我已经更新了清单文件中对话框的路径,但我不知道为什么新的文件夹结构不再起作用。清单文件是否应该与对话活动类文件在同一目录中?
清单文件
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=""
package=""
>
<application>
<activity
android:name="path to dialog"
android:excludeFromRecents="true"
android:exported="false"
android:finishOnTaskLaunch="true"
android:launchMode="singleTask"
android:permission=""
android:taskAffinity=""
android:theme=""
/>
</application>
</manifest>
Here is the original folder structure, which is working:
--showdialog
--BUCK
--AndroidManifest.xml
--Dialog.class
--Controller.class
Here is the new folder structure, no longer working:
--showdialog
--AndroidManifest.xml
--controller
--BUCK
--Controller.class
--dialog
--BUCK
--Dialog.class
【问题讨论】:
-
我不明白。问题是什么?
-
更改文件夹结构后,我在清单文件中更新了对话框的路径,但不知道为什么新的文件夹结构不再起作用(更改后无法触发对话框) .
-
如果您单击 AndroidManifest 中提到的路径,是否会将您带到实际文件?
-
您是否真的将已编译的 .class 文件放入您的文件夹中?你是如何启动这个的?