[英]“Could not find class 'android.support.v4.app.FragmentActivity'” Error
I'm getting the following error: 我收到以下错误:
> 02-06 23:10:24.104: E/dalvikvm(912): Could not find class
> 'android.support.v4.app.FragmentActivity', referenced from method
> com.robotium.solo.Waiter.getSupportFragment
When running a project I'm using for Programming Mobile Applications for Android Handheld Systems on Coursera.I believe this error is somehow related to my output answer being considered incorrect. 当我运行一个项目时,我正在使用Coursera上的Android手持系统的移动应用程序编程。我认为这个错误与我的输出答案被认为是不正确有关。 if I can fix this error,I can fix my output. 如果我可以修复此错误,我可以修复输出。
I didn't have the latest version of Android Support Repository (not installed) when I initially ran my tests,but I now have the latest version of Android Support Repository according to the SDK Manager (v4),and have even restarted Eclipse and the emulator,but I'm still getting the error. 我最初运行测试时没有最新版本的Android支持存储库(未安装),但我现在根据SDK Manager(v4)拥有最新版本的Android支持存储库,甚至重新启动了Eclipse和模拟器,但我仍然得到错误。
How can I fix the LogCat claiming ASR doesn't exist when it's installed according to the SDK? 如何修复LogCat声称ASR根据SDK安装时不存在?
If there is no "libs" folder then create one 如果没有“libs”文件夹,则创建一个
then click 然后点击
Project> Android Tools >Add support Library. 项目> Android工具>添加支持库。
This will help you. 这会对你有所帮助。 Finally clean the project and restart Eclipse 最后清理项目并重启Eclipse
You need to add the support library com.android.support:support-v4 您需要添加支持库com.android.support:support-v4
On Android Studio, go in the menu File > Project Structure (Ctrl + Alt + Shift + S) Select app , tab Dependecies , and in the + and search for the Maven libraries that you will use. 在Android Studio上,进入菜单File> Project Structure (Ctrl + Alt + Shift + S)选择app ,tab Dependecies ,然后在+中搜索您将使用的Maven库。 In your case, the com.android.support:support-v4 在您的情况下, com.android.support:support-v4
Either create a "libs" folder and put the "android-support-v4.jar" file 创建一个“libs”文件夹并放入“android-support-v4.jar”文件
else 其他
import the " android-support-v4.jar" to Android Private Libraries folder, and restart the IDE to take effect. 将“android-support-v4.jar”导入Android Private Libraries文件夹,然后重新启动IDE以使其生效。
Please Perform these two steps: 1)It's better to create libs folder and add "android-support-v4.jar" and dont forget to check checkbox mentioning "system library " . 请执行以下两个步骤:1)最好创建libs文件夹并添加“android-support-v4.jar”,别忘了勾选提到“系统库”的复选框。 2) Copy "android-support-v4.jar" from "adt-bundle-linux-x86-20140702/sdk/extras/android/support/v4" folder to your "/home/vinny/workspace/appcompat_v7/libs" appcompat libs folder.You can add "android-support-v7-appcompat.jar" this jar also to this folder from "adt-bundle-linux-x86-20140702/sdk/extras/android/support/v7" 2)将“android-support-v4.jar”从“adt-bundle-linux-x86-20140702 / sdk / extras / android / support / v4”文件夹复制到“/ home / vinny / workspace / appcompat_v7 / libs”appcompat libs文件夹。你可以从“adt-bundle-linux-x86-20140702 / sdk / extras / android / support / v7”这个文件夹中添加“android-support-v7-appcompat.jar”这个jar
Note: Don't forget to perform this step, properties->Android->Library-> add 注意:不要忘记执行此步骤,属性 - > Android-> Library-> add
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.