1

I have downloaded android-support-v4.jar file for using android.support.v4.view.PagerAdapter in my application.

I develop my application and I test it on real android device, it works fine.

but whenever I add the android-support-v4 to my IDE and I try to rebuild the project I get below warnings: warning after rebuild project

Also when I try to Run it on real device ( or emulator ) I will get below errors: error after clicking un run button in IDE

Note: as I said before adding the android-support-v4 my application works correctly. Note: the IDE that I am using is: IntelliJ 13.1.3 Note: for adding android-support-v4 to my project: I add it to project like this: enter image description here

at the end I've attached my manifest file, maybe the reason is from it.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.BritishCouncilasfads"
          android:installLocation="auto"
          android:versionCode="1"
          android:versionName="1.0">
    <uses-sdk android:minSdkVersion="10"/>
    <application android:label="@string/app_name">
        <activity android:name=".MainActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity android:name=".ListViewActivity"/>
        <activity android:name=".SecondActivity"/>
    </application>
</manifest> 

Please help me, I don't know what should I do !! :(

Elyas Hadizadeh
  • 3,289
  • 8
  • 40
  • 54

1 Answers1

0

I've faced the same error on 2.3 device after switching from support v4 library version 22.0 to 22.2. As soon as the problem appears on 2.3 and is not reproducible on 4.0+ it is 7MB .dex file limit and not 65k methods problem.

The two reliable solutions would be getting rid of some big library or using proguard. Proguard with almost default configuration works great for me reducing dex size from 7.5MB to 3.5MB.

More info Error while installing application (INSTALL_FAILED_DEXOPT)

Community
  • 1
  • 1
user711058
  • 675
  • 7
  • 11