简体   繁体   中英

Android Design Support Library not compiling

I'm trying to add in the new Design Support library but it won't compile.

Before making the following changes, my code compiled perfectly fine.

I tried adding it using:

 compile 'com.android.support:design:22.2.0'

And I removed:

compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'

Since the design support library has these two libraries inside it. However, my app won't compile!!

I get the following error:

Warning:Dependency xpp3:xpp3:1.1.4c is ignored for productionDebug as it may be conflicting with the internal version provided by Android.
     In case of problem, please repackage it with jarjar to change the class packages

This error is repeated 4 times for each of my flavours (production/stagingDebug/Release).

It then lists a bunch of image errors such as:

/Users/.../app/src/main/res/drawable-mdpi/ic_chat.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

Then finally after a bunch of common output, it says:

Error:Execution failed for task ':app:dexStagingDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

Pls help :(

In app gradle add this to defaultConfig

multiDexEnabled = true

1:- Add this Line to Manifest Application
android:name="android.support.multidex.MultiDexApplication"

2:- In app gradle add this to defaultConfig

 multiDexEnabled = true

3:-add this in Gradle app dependencies

compile 'com.android.support:multidex:1.0.0'

Now you won't get any exception its pure solution. :) Enjoy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM