Android Studio 1.2.2 Classnotfoundexception Android.widget.viewstub
Solution 1:
If you are getting this exception because you have set exception breakpoint, then instead of debugging, remove all breakpoints, just run the code,go to logcat and check the logs for the actual exception. You could be trying to access a nested component like button from the grandparent and therefore the error.
Solution 2:
ViewStub
lays in a package called android.view
, not android.widget
. Change the import directive and see if it helps.
Solution 3:
Old question, but I had this same issue with Android Studio 2.3
With a project that had 4 modules, the trouble was that I had a misspelling in one of the gradle.build
files for one of the modules in the applicationId
value.
defaultConfig {
applicationId "com.my.project"
}
After fixing this, and verifying all of the AndroidManifest.xml
values for package
matched the build.gradle
value above within each module, it worked.
<manifestxmlns:android="http://schemas.android.com/apk/res/android"package="com.my.project"></manifest>
You may also need to go to File > Invalidate Caches / Restart...
to clean it all out.
Solution 4:
the method findClass(String name)
of the classLoader that defined by yourself don't throws ClassNotFoundException
.
Post a Comment for "Android Studio 1.2.2 Classnotfoundexception Android.widget.viewstub"