Android Error: Caused By: Java.lang.classnotfoundexception
I'm extremely new on Android Development, this is my first app. I try to run an app on a device or an emulator and I get 'Unfortunately, app name has stopped'. I believe the error
Solution 1:
in your manifest
, the main package name is com.benchaful.newboard
:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.benchaful.newboard"
android:versionCode="1"
android:versionName="1.0">
And on the declaration of your Activity
, you have com.benchaful.newBoard
( with B uppercase) , i think that it's just a syntax error when you are tapping the name of your package.you should declare your activity
like this :
<activityandroid:name="com.benchaful.newboard.MainActivity"android:label="@string/app_name"android:screenOrientation="portrait">
or :
<activityandroid:name=".MainActivity"android:label="@string/app_name"android:screenOrientation="portrait">
Solution 2:
Sorry if this is obvious but make sure you have a class called MainActivity
, which extends Activity
.
And that its package name is com.benchaful.newBoard.MainActivity
Post a Comment for "Android Error: Caused By: Java.lang.classnotfoundexception"