0

java.lang.classnotfound exception is coming, while launching a simple helloworld app on mi4i android phone. it is running fine on Emulator. I am using android studio 2.3. I already checked the class name and path in mainfest file. Can anybody help, what wrong i am doing? Following is the error screenshot Mobile screenshot while launching app

Following is my manifest file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.tarun.myapplication">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
Tarun Soni
  • 11
  • 4
  • Check logcat and/or launch the app in debug mode to see where it is dying. – Tim Biegeleisen Mar 11 '17 at 10:04
  • See you build.gradle file.. and check your minsdk and targetsdk version minSdkVersion 15 targetSdkVersion 25 – Azhar osws Mar 11 '17 at 10:07
  • I am running on my phone...while launching it is throwing this error. it is running fine on emulator. I am building it using android studio 2.3. – Tarun Soni Mar 11 '17 at 10:08
  • Print your logcat here. – Azhar osws Mar 11 '17 at 10:11
  • @Azhar, i checked it is same – Tarun Soni Mar 11 '17 at 10:12
  • Try to clean and build it again. – Azhar osws Mar 11 '17 at 10:14
  • post logCAT as well as manifest file please! – Jaydeep Devda Mar 11 '17 at 10:15
  • LOGCAT 03-11 15:49:43.590 2430-2430/? I/art: Not late-enabling -Xcheck:jni (already on) 03-11 15:49:43.590 2430-2430/? W/art: Unexpected CPU variant for X86 using defaults: x86 03-11 15:49:43.803 2430-2430/x.app1 W/System: ClassLoader referenced unknown path: /data/app/x.app1-1/lib/x86 03-11 15:49:43.808 2430-2430/x.app1 I/InstantRun: Starting Instant Run Server for x.app1 – Tarun Soni Mar 11 '17 at 10:27
  • 03-11 15:49:44.196 2430-2430/x.app1 W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 03-11 15:49:44.517 2430-2551/x.app1 I/OpenGLRenderer: Initialized EGL, version 1.4 03-11 15:49:44.517 2430-2551/x.app1 D/OpenGLRenderer: Swap behavior 1 – Tarun Soni Mar 11 '17 at 10:27
  • 03-11 15:49:44.554 2430-2551/x.app1 E/EGL_emulation: tid 2551: eglSurfaceAttrib(1174): error 0x3009 (EGL_BAD_MATCH) 03-11 15:49:44.554 2430-2551/x.app1 W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa9e771c0, error=EGL_BAD_MATCH 03-11 15:49:44.589 2430-2430/x.app1 W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView – Tarun Soni Mar 11 '17 at 10:27
  • not able to post all at once so posted in split way. – Tarun Soni Mar 11 '17 at 10:28
  • @Code-Apprentice, can you please check the screenshot attached on this link -https://i.stack.imgur.com/dxN8V.png – Tarun Soni Mar 12 '17 at 05:27
  • You should edit your question with the stacktrace as text, not a screenshot or a comment. – Code-Apprentice Mar 12 '17 at 05:28
  • It is difficult to type word by word the stack trace..how can i convert into text – Tarun Soni Mar 12 '17 at 05:31
  • First of all, copy your comments above directly into your question. Secondly, how are you running your app? Are you using Android Studio? If so, you should open the Android Monitor window and copy the stacktrace from there. – Code-Apprentice Mar 12 '17 at 05:47
  • I am not running it on android studio...i am running it on mobile phone. – Tarun Soni Mar 12 '17 at 05:51
  • Yes please. It is better to discuss this on chat. thanks – Tarun Soni Mar 12 '17 at 06:01
  • The solution for this issue is answered for eclipse but not for android studio in the below thread – Tarun Soni Mar 12 '17 at 06:24
  • http://stackoverflow.com/questions/10866431/android-activity-classnotfoundexception-tried-everything – Tarun Soni Mar 12 '17 at 06:24

0 Answers0