Solved

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

Posted on 2014-10-19
1
3,889 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
These days software publishers make it possible to move all the possible applications on smartphones, tablets, smartwatches, and more. Although behind every logic and decision is a gross doubt: how do they make it possible? In this blog post, we sha…
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.

687 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