Android 프로젝트에 Facebook SDK 추가를 추가하는 동안 다음 오류가 발생합니다.
예상치 못한 최상위 수준 예외 : ': 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 ''가 0이 아닌 종료 값 2로 완료되었습니다.
defaultConfig의 android 함수에서 build.gradle에 다음 줄을 추가하십시오.
multiDexEnabled true
그런 다음이 종속성을 추가하십시오.
compile 'com.android.support:multidex:1.0.1
다음과 같이 응용 프로그램을 업데이트하십시오.
public class MyApplication extends MultiDexApplication {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(base);
}
그런 다음 매니페스트에 언급하십시오.
<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>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다