Solved

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

Posted on 2014-10-19
1
3,753 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
only getting 3g not 4g everywhere 15 69
Pictures cut off when texting 13 102
Samsung Android Marshmallow + autostart apps on boot 7 108
iPhone v Android phone 7 32
Introduction Everyone is using a smartphone these days. Contacts, messages, applications, documents, bookmarks, pictures, videos and other stuff which you created and are present only on your device come under the umbrella called “Personal Data”.…
This is an explanation of a simple data model to help parse a JSON feed
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.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now