java - Error when Facebook sdk Added into android project -


i getting following error while adding facebook sdk added android project

unexpected top-level exception:error:execution failed task ':app:transformclasseswithdexfordebug'.

com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command 'c:\program files\java\jdk1.8.0_31\bin\java.exe'' finished non-zero exit value 2

add bellow line in build.gradle in android function in defaultconfig

multidexenabled true 

then add dependencies

compile 'com.android.support:multidex:1.0.1 

update application bellow

public class myapplication extends multidexapplication {      @override     protected void attachbasecontext(context base) {         super.attachbasecontext(base);         multidex.install(base);     } 

then mention manifest

<application         android:name=".myapplication"         android:allowbackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:largeheap="true"         android:supportsrtl="true"         android:theme="@style/apptheme.noactionbar"></manifest> 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -