Solved

Why is the ViewPager not getting recognized in Android Studio's design view?

Posted on 2014-10-19
1
3,809 Views
Last Modified: 2014-10-19
Hi:

I'm using Android Studio 0.8.6 (beta).
I'm trying to create a fragment using the "android.support.v4.view.ViewPager"

I get the following error when I'm in the design view of the fragment layout:
Rendering Problems 

The following classes could not be instantiated:
- android.support.v4.view.ViewPager (Open Class, Show Exception)

 Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE  

Exception Details java.lang.ClassNotFoundException: android.support.v4.view.ViewConfigurationCompatFroyo   
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:148)   
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)   
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)   
at android.support.v4.view.ViewConfigurationCompat$FroyoViewConfigurationVersionImpl.getScaledPagingTouchSlop(ViewConfigurationCompat.java:49)   
at android.support.v4.view.ViewConfigurationCompat.getScaledPagingTouchSlop(ViewConfigurationCompat.java:73)   
at android.support.v4.view.ViewPager.initViewPager(ViewPager.java:367)   
at android.support.v4.view.ViewPager.<init>(ViewPager.java:355)   
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)   
at android.view.LayoutInflater.inflate(LayoutInflater.java:478)   
at android.view.LayoutInflater.inflate(LayoutInflater.java:381) 

Open in new window


I'm pretty new the Android thing and Android Studio.
I've been googling and have not found a solution that makes sense to me.
How do I correct this?

Thanks,
JohnB
0
Comment
Question by:jxbma
1 Comment
 
LVL 1

Accepted Solution

by:
jxbma earned 0 total points
ID: 40391286
After several hours of combing through Google, I was able to find the following which helped solve my issue:

http://stackoverflow.com/questions/10199430/android-class-not-found-exception-android-support-v4-app-fragmentpager

JB
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First off, some of you reading this are already thinking there is an error in the title. It really should be Kindle Fire versus OTHER Android tablets. That's because the Amazon Kindle Fire IS an Android tablet. Well, it is and it's not. It's running…
Working settings for French ISP Orange "Prêt à Surfer" SIM cards for data connections only. Can't be found anywhere else !
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question