0

I am trying to run my app in device or emulator. But it's not even allowing to open the main activity. After installing, it throws this exception. I have checked almost every solution that are present on StackOverflow, but none of them is working. Efforts that I have made:

  1. Tried to run by removing application name from Manifest.xml
  2. Changed the Activity name with . as well as with the full path
  3. Made lots of changes in build path order and export.

I guess I have tried most of the solutions that are available on StackOverflow. Here is my Manifest.xml file

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="19" />
<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:xlargeScreens="true" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />

    android:allowBackup="false"
    android:icon="@drawable/ic_launcher"
    android:theme="@drawable/android_bg"
    android:label="@string/app_name" >
    <activity
        android:name=".MainActivity"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="adjustPan"
        android:theme="@android:style/Theme.NoTitleBar"
        android:configChanges="keyboardHidden|orientation|screenSize" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.EDIT" />
            <action android:name="android.intent.action.PICK" />
            <action android:name="android.intent.action.GET_CONTENT" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:host="*" />
            <data android:mimeType="application/octet-stream" />
            <data android:mimeType="application/ccsecure" />
            <data android:mimeType="document/ccsecure" />
            <data android:pathPattern=".*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*.ccsecure" />
            <data android:pathPattern=".*..*.ccsecure" />
            <data android:pathPattern=".*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*..*..*..*.ccsecure" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.EDIT" />
            <action android:name="android.intent.action.PICK" />
            <action android:name="android.intent.action.GET_CONTENT" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:host="*" />
            <data android:mimeType="*/*" />
            <data android:mimeType="application/octet-stream" />
            <data android:mimeType="application/ccsecure" />
            <data android:mimeType="document/ccsecure" />
            <data android:scheme="file" />
            <data android:pathPattern=".*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*.ccsecure" />
            <data android:pathPattern=".*..*.ccsecure" />
            <data android:pathPattern=".*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*..*..*..*.ccsecure" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.EDIT" />
            <action android:name="android.intent.action.PICK" />
            <action android:name="android.intent.action.GET_CONTENT" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:host="*" />
            <data android:mimeType="*/*" />
            <data android:mimeType="application/octet-stream" />
            <data android:mimeType="application/ccsecure" />
            <data android:mimeType="document/ccsecure" />
            <data android:scheme="content" />
            <data android:pathPattern=".*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ccsecure" />
            <data android:pathPattern=".*.ccsecure" />
            <data android:pathPattern=".*..*.ccsecure" />
            <data android:pathPattern=".*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*..*..*.ccsecure" />
            <data android:pathPattern=".*..*..*..*..*..*..*..*..*.ccsecure" />
        </intent-filter>
    </activity>
</application>

The most surprising thing for me is app is already uploaded by another developer on play store and it's working as expected if I download it from play store. But, it's not allowing me to open the MainActivity after downloading.

Thank you in advance. Your help will be highly appreciated.

Below is the error log from my logcat:

06-24 14:45:13.498: E/AndroidRuntime(19619): FATAL EXCEPTION: main
06-24 14:45:13.498: E/AndroidRuntime(19619): Process: com.cipher.Shield, PID: 19619
06-24 14:45:13.498: E/AndroidRuntime(19619): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.cipher.Shield/com.cipher.Shield.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.cipher.Shield.MainActivity" on path: DexPathList[[zip file "/data/app/com.cipher.Shield-10.apk"],nativeLibraryDirectories=[/data/app-lib/com.cipher.Shield-10, /vendor/lib, /system/lib]]
06-24 14:45:13.498: E/AndroidRuntime(19619):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2495)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at android.app.ActivityThread.access$900(ActivityThread.java:170)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1304)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at android.os.Handler.dispatchMessage(Handler.java:102)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at android.os.Looper.loop(Looper.java:146)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at android.app.ActivityThread.main(ActivityThread.java:5635)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at java.lang.reflect.Method.invokeNative(Native Method)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at java.lang.reflect.Method.invoke(Method.java:515)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
06-24 14:45:13.498: E/AndroidRuntime(19619):    at dalvik.system.NativeStart.main(Native Method)
06-24 14:45:13.498: E/AndroidRuntime(19619): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.cipher.Shield.MainActivity" on path: DexPathList[[zip file "/data/app/com.cipher.Shield-10.apk"],nativeLibraryDirectories=[/data/app-lib/com.cipher.Shield-10, /vendor/lib, /system/lib]]
13
  • What the error? Attach full crash log. Commented Jun 24, 2015 at 21:41
  • can you please add the top part of the manifest as well Commented Jun 24, 2015 at 21:46
  • @Nader I have added the upper portion of manifest file Commented Jun 24, 2015 at 21:51
  • @SergeyShustikov I have edited with erroe log Commented Jun 24, 2015 at 21:52
  • Where package = line? Like an package="com.cipher.Shield" ? Commented Jun 24, 2015 at 21:56

1 Answer 1

1

Eclipse does not include support libraries (i suppose you are using them) into dex file. So.

To fix this, right-click your project, properties, build path and go to export tab. There make sure "Android private libraries" are checked. A clean and rebuild should put you on track ...

And make sure you doesn't included both support-v4 and support-v7. It will make a conflict.

Sign up to request clarification or add additional context in comments.

3 Comments

It is already checked. And after your comment, I tried it once again. Still it is giving the same error.
@Rushi check also proguard file. It may shrink this class in build process.
I don't have any idea about proguard file but in my project, there are two proguard files : 1. proguard-project.txt and proguard.cfg. let me know which file to check and what to check in that file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.