gpt4 book ai didi

机器人 : how to start activity defined in library project

转载 作者:太空宇宙 更新时间:2023-11-03 12:00:33 25 4
gpt4 key购买 nike

我正在开发一个使用 androidVNC Viewer 作为库项目的 android 应用程序,但我无法从 androidVNC 启动 Activity ( Activity 未找到异常)。

另外,我如何 bundle 一个库项目并将其作为一个 apk 使用?

更新

我正在使用以下 Intent 调用:

Intent call= new Intent("android.androidVNC.androidVNC.LAUNCH");
startActivity(call);

更新 2使用以下代码后,我想我可以开始 Activity 但得到this (java.lang.NoSuchFieldError: android.androidVNC.R$id.textIP) 错误...

Intent vnc_call = new Intent(getApplicationContext(), androidVNC.class);
vnc_call.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(login);

在我检查了 R.java、androidVNC original 和 androidVNC 用作库时(在生成的 java 文件下)...我得到的是 textip 存在于原始 R.java 中 但它是调用项目中(生成的 java 文件)的 R.java 中不存在

logcat的O/P(前几行)


04-05 01:34:18.135: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/AbstractConnectionBean; (256)04-05 01:34:18.135: W/dalvikvm(479): Link of class 'Landroid/androidVNC/AbstractConnectionBean;' failed04-05 01:34:18.135: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/ConnectionBean; (8)04-05 01:34:18.135: W/dalvikvm(479): Link of class 'Landroid/androidVNC/ConnectionBean;' failed04-05 01:34:18.145: W/dalvikvm(479): VFY: unable to find class referenced in signature (Landroid/androidVNC/ConnectionBean;)04-05 01:34:18.155: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/AbstractConnectionBean; (256)04-05 01:34:18.155: W/dalvikvm(479): Link of class 'Landroid/androidVNC/AbstractConnectionBean;' failed04-05 01:34:18.155: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/ConnectionBean; (8)04-05 01:34:18.155: W/dalvikvm(479): Link of class 'Landroid/androidVNC/ConnectionBean;' failed04-05 01:34:18.187: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/AbstractConnectionBean; (256)04-05 01:34:18.187: W/dalvikvm(479): Link of class 'Landroid/androidVNC/AbstractConnectionBean;' failed04-05 01:34:18.187: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/ConnectionBean; (8)`04-05 01:34:18.135: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/AbstractConnectionBean; (256)04-05 01:34:18.135: W/dalvikvm(479): Link of class 'Landroid/androidVNC/AbstractConnectionBean;' failed04-05 01:34:18.135: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/ConnectionBean; (8)04-05 01:34:18.135: W/dalvikvm(479): Link of class 'Landroid/androidVNC/ConnectionBean;' failed04-05 01:34:18.145: W/dalvikvm(479): VFY: unable to find class referenced in signature (Landroid/androidVNC/ConnectionBean;)04-05 01:34:18.155: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/AbstractConnectionBean; (256)04-05 01:34:18.155: W/dalvikvm(479): Link of class 'Landroid/androidVNC/AbstractConnectionBean;' failed04-05 01:34:18.155: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/ConnectionBean; (8)04-05 01:34:18.155: W/dalvikvm(479): Link of class 'Landroid/androidVNC/ConnectionBean;' failed04-05 01:34:18.187: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/AbstractConnectionBean; (256)04-05 01:34:18.187: W/dalvikvm(479): Link of class 'Landroid/androidVNC/AbstractConnectionBean;' failed04-05 01:34:18.187: W/dalvikvm(479): Unable to resolve superclass of Landroid/androidVNC/ConnectionBean; (8)

有什么线索吗?

最佳答案

即使库项目有自己的 AndroidManifest.xml,其内容也不会添加到您的构建中。如果您打算使用库包含的任何通常在 list 中声明的​​内容,则必须将它们复制到您的实际应用程序 list 中。这包括 Activity 、广播接收器、服务、权限等。

关于机器人 : how to start activity defined in library project,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10010013/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com