0

我有 FB 和谷歌移动广告 sdk。当我进行构建时,我得到了错误

无法将类转换为 dex 格式。

当我进行单独构建时,效果很好。我正在通过导入 fb 和 google 移动广告 sdk 来测试一个新项目。

错误日志:

CommandInvokationFailure: Unable to convert classes into dex format.
C:\Program Files\Unity\Hub\Editor\2018.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -Xmx4096M -Dcom.android.sdkmanager.toolsdir="D:/Babji Unity/android-sdks\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Hub\Editor\2018.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[

trouble writing output: Too many field references to fit in one dex file: 76772; max is 65536.
You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.
References by package:
     1 android.accounts
    28 android.app
    14 android.arch.core.internal
  1825 android.arch.lifecycle
     1 android.content
    38 android.content.pm
    10 android.content.res
     2 android.database
    49 android.graphics
     1 android.hardware
    11 android.hardware.camera2
     1 android.location
    17 android.media
     1 android.media.browse
    15 android.net
     6 android.net.wifi
     1 android.opengl
    33 android.os
     3 android.print
     1 android.provider
    13 android.support.annotation
  1786 android.support.compat
  1786 android.support.coreui
  1786 android.support.coreutils
  1888 android.support.customtabs
  1786 android.support.fragment
  1992 android.support.graphics.drawable
  1786 android.support.graphics.drawable.animated
  1786 android.support.mediacompat
  1786 android.support.v4
    13 android.support.v4.accessibilityservice
   943 android.support.v4.app
   113 android.support.v4.content
    13 android.support.v4.content.pm
    16 android.support.v4.content.res
    50 android.support.v4.graphics
    57 android.support.v4.graphics.drawable
     4 android.support.v4.hardware.display
    12 android.support.v4.hardware.fingerprint
    11 android.support.v4.internal.view
   428 android.support.v4.media
     8 android.support.v4.media.app
   378 android.support.v4.media.session
     7 android.support.v4.net
    37 android.support.v4.os
    52 android.support.v4.print
    98 android.support.v4.provider
    54 android.support.v4.text
     6 android.support.v4.text.util
   120 android.support.v4.util
   412 android.support.v4.view
   126 android.support.v4.view.accessibility
     8 android.support.v4.view.animation
   478 android.support.v4.widget
   399 android.support.v7.app
  1786 android.support.v7.appcompat
  1786 android.support.v7.cardview
     8 android.support.v7.content.res
    18 android.support.v7.graphics.drawable
     1 android.support.v7.text
    85 android.support.v7.view
   270 android.support.v7.view.menu
   897 android.support.v7.widget
     1 android.system
     6 android.text
     1 android.text.util
    18 android.util
    22 android.view
     8 android.view.accessibility
     5 android.webkit
    13 android.widget
     3 bitter.jnibridge
   158 bolts
  1780 com.SAG.GoogleMobileAdsTest
   406 com.facebook
  1786 com.facebook.android
   249 com.facebook.appevents
    57 com.facebook.appevents.codeless
   109 com.facebook.appevents.codeless.internal
   135 com.facebook.appevents.internal
  1832 com.facebook.applinks
  1786 com.facebook.common
  1786 com.facebook.core
    11 com.facebook.devicerequests.internal
   643 com.facebook.internal
  1995 com.facebook.login
    82 com.facebook.login.widget
  1789 com.facebook.marketing
    44 com.facebook.marketing.internal
  1818 com.facebook.messenger
  1829 com.facebook.places
   109 com.facebook.places.internal
    68 com.facebook.places.model
  1837 com.facebook.share
   433 com.facebook.share.internal
   194 com.facebook.share.model
   135 com.facebook.share.widget
    52 com.facebook.unity
    25 com.google.ads
    24 com.google.ads.mediation
     1 com.google.ads.mediation.admob
    11 com.google.ads.mediation.customevent
    20 com.google.android.gms.actions
  1847 com.google.android.gms.ads
    19 com.google.android.gms.ads.doubleclick
    66 com.google.android.gms.ads.formats
    16 com.google.android.gms.ads.identifier
  1780 com.google.android.gms.ads.impl
     3 com.google.android.gms.ads.initialization
    59 com.google.android.gms.ads.internal
    71 com.google.android.gms.ads.internal.overlay
    60 com.google.android.gms.ads.mediation
     1 com.google.android.gms.ads.mediation.admob
    12 com.google.android.gms.ads.mediation.customevent
     4 com.google.android.gms.ads.mediation.rtb
     1 com.google.android.gms.ads.reward.mediation
    10 com.google.android.gms.ads.rewarded
    20 com.google.android.gms.ads.search
  1780 com.google.android.gms.ads_base
  1780 com.google.android.gms.ads_identifier
  1891 com.google.android.gms.common
    36 com.google.android.gms.common.api
    27 com.google.android.gms.common.api.internal
    18 com.google.android.gms.common.config
   130 com.google.android.gms.common.internal
     3 com.google.android.gms.common.internal.constants
     1 com.google.android.gms.common.internal.safeparcel
     4 com.google.android.gms.common.logging
     1 com.google.android.gms.common.providers
     1 com.google.android.gms.common.sqlite
    38 com.google.android.gms.common.stats
    49 com.google.android.gms.common.util
    10 com.google.android.gms.common.util.concurrent
     5 com.google.android.gms.common.wrappers
     5 com.google.android.gms.dynamic
    21 com.google.android.gms.dynamite
     2 com.google.android.gms.dynamite.descriptors.com.google.android.gms.ads.dynamite
  1780 com.google.android.gms.gass
 10338 com.google.android.gms.internal.ads
     4 com.google.android.gms.internal.ads_identifier
     5 com.google.android.gms.internal.common
   562 com.google.android.gms.internal.measurement
    16 com.google.android.gms.measurement.api
     6 com.google.android.gms.measurement.internal
  1780 com.google.android.gms.measurement.sdk.api
  1780 com.google.android.gms.measurement_base
     6 com.google.android.gms.security
     6 com.google.unity
  1908 com.google.unity.ads
     2 com.google.zxing
   294 com.unity3d.player
    28 java.lang
    11 java.lang.annotation
     2 java.math
     2 java.nio
     1 java.nio.channels
     1 java.text
     6 java.util
     6 java.util.concurrent
     4 java.util.logging
     4 javax.microedition.khronos.egl
    20 org.fmod
     1 org.json
]
stdout[
processing archive D:\Babji Unity\GoogleMobileAds Test\Temp\StagingArea\android-libraries\GoogleMobileAdsPlugin\libs\.\unity-plugin-library.jar...
processing com/google/unity/BuildConfig.class...
processing com/google/unity/ads/AdNetworkExtras.class...
processing com/google/unity/ads/Banner.class...
processing com/google/unity/ads/Banner$1.class...
processing com/google/unity/ads/Banner$10.class...
processing com/google/unity/ads/Banner$11.class...
processing com/google/unity/ads/Banner$12.class...
processing com/google/unity/ads/Banner$13.class...
processing com/google/unity/ads/Banner$2.class...
processing com/google/unity/ads/Banner$3.class...
processing com/google/unity/ads/Banner$3$1.class...
processing com/google/unity/ads/Banner$3$2.class...
processing com/google/unity/ads/Banner$3$3.class...
processing com/google/unity/ads/Banner$3$4.class...
processing com/google/unity/ads/Banner$3$5.class...
processing com/google/unity/ads/Banner$4.class...
processing com/google/unity/ads/Banner$5.class...
processing com/google/unity/ads/Banner$6.class...
processing com/google/unity/ads/Banner$7.class...
processing com/google/unity/ads/Banner$8.class...
processing com/google/unity/ads/Banner$9.class...
processing com/google/unity/ads/CustomNativeAd.class...
processing com/google/unity/ads/CustomNativeAd$1.class...
processing com/google/unity/ads/CustomNativeAd$2.class...
processing com/google/unity/ads/Interstitial.class...
processing com/google/unity/ads/Interstitial$1.class...
processing com/google/unity/ads/Interstitial$1$1.class...
processing com/google/unity/ads/Interstitial$1$1$1.class...
processing com/google/unity/ads/Interstitial$1$1$2.class...
processing com/google/unity/ads/Interstitial$1$1$3.class...
processing com/google/unity/ads/Interstitial$1$1$4.class...
processing com/google/unity/ads/Interstitial$1$1$5.class...
processing com/google/unity/ads/Interstitial$2.class...
processing com/google/unity/ads/Interstitial$3.class...
processing com/google/unity/ads/NativeAdLoader.class...
processing com/google/unity/ads/NativeAdLoader$1.class...
processing com/google/unity/ads/NativeAdLoader$2.class...
processing com/google/unity/ads/NativeAdLoader$3.class...
processing com/google/unity/ads/NativeAdLoader$3$1.class...
processing com/google/unity/ads/NativeAdLoader$3$2.class...
processing com/google/unity/ads/NativeAdLoader$3$3.class...
processing com/google/unity/ads/NativeAdLoader$4.class...
processing com/google/unity/ads/PluginUtils.class...
processing com/google/unity/ads/RewardBasedVideo.class...
processing com/google/unity/ads/RewardBasedVideo$1.class...
processing com/google/unity/ads/RewardBasedVideo$1$1.class...
processing com/google/unity/ads/RewardBasedVideo$1$1$1.class...
processing com/google/unity/ads/RewardBasedVideo$1$1$2.class...
processing com/google/unity/ads/RewardBasedVideo$1$1$3.class...
processing com/google/unity/ads/RewardBasedVideo$1$1$4.class...
processing com/google/unity/ads/RewardBasedVideo$1$1$5.class...
processing com/google/unity/ads/RewardBasedVideo$1$1$6.class...
processing com/google/unity/ads/RewardBasedVideo$1$1$7.class...
processing com/google/unity/ads/RewardBasedVideo$1$1$8.class...
processing com/google/unity/ads/RewardBasedVideo$2.class...
processing com/google/unity/ads/RewardBasedVideo$3.class...
processing com/google/unity/ads/RewardBasedVideo$4.class...
processing com/google/unity/ads/UnityAdListener.class...
processing com/google/unity/ads/UnityAdLoaderListener.class...
processing com/google/unity/ads/UnityRewardBasedVideoAdListener.class...
processing com/google/unity/ads/UnityRewardedAd.class...
processing com/google/unity/ads/UnityRewardedAd$1.class...
processing com/google/unity/ads/UnityRewardedAd$2.class...
processing com/google/unity/ads/UnityRewardedAd$2$1.class...
processing com/google/unity/ads/UnityRewardedAd$2$1$1.class...
processing com/google/unity/ads/UnityRewardedAd$2$1$2.class...
processing com/google/unity/ads/UnityRewardedAd$3.class...
processing com/google/unity/ads/UnityRewardedAd$4.class...
processing com/google/unity/ads/UnityRewardedAd$4$1.class...
processing com/google/unity/ads/UnityRewardedAd$4$1$1.class...
processing com/google/unity/ads/UnityRewardedAd$4$1$2.class...
processing com/google/unity/ads/UnityRewardedAd$4$1$3.class...
processing com/google/unity/ads/UnityRewardedAd$4$1$4.class...
processing com/google/unity/ads/UnityRewardedAdCallback.class...
processing archive D:\Babji Unity\GoogleMobileAds Test\Temp\StagingArea\android-libraries\android.arch.lifecycle.runtime-1.0.0\libs\.\classes.jar...
processing android/arch/lifecycle/BuildConfig.class...
processing android/arch/lifecycle/LifecycleRegistry.class...
processing android/arch/lifecycle/LifecycleRegistry$1.class...
processing android/arch/lifecycle/LifecycleRegistry$ObserverWithState.class...
processing android/arch/lifecycle/LifecycleRegistryOwner.class...
processing android/arch/lifecycle/ReportFragment.class...
processing android/arch/lifecycle/ReportFragment$ActivityInitializationListener.class...
processing archive D:\Babji Unity\GoogleMobileAds Test\Temp\StagingArea\android-libraries\com.android.support.animated-vector-drawable-26.1.0\libs\.\classes.jar...
processing android/support/graphics/drawable/Animatable2Compat.class...
processing android/support/graphics/drawable/Animatable2Compat$AnimationCallback.class...
processing android/support/graphics/drawable/Animatable2Compat$AnimationCallback$1.class...
processing android/support/graphics/drawable/AnimatedVectorDrawableCompat.class...
processing android/support/graphics/drawable/AnimatedVectorDrawableCompat$1.class...
processing android/support/graphics/drawable/AnimatedVectorDrawableCompat$2.class...
processing android/support/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState.class...
processing android/support/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableDelegateState.class...
processing android/support/graphics/drawable/AnimationUtilsCompat.class...
processing android/support/graphics/drawable/AnimatorInflaterCompat.class...
processing android/support/graphics/drawable/AnimatorInflaterCompat$1.class...
processing android/support/graphics/drawable/AnimatorInflaterCompat$PathDataEvaluator.class...
processing android/support/graphics/drawable/ArgbEvaluator.class...
processing android/support/graphics/drawable/PathInterpolatorCompat.class...
processing android/support/graphics/drawable/animated/BuildConfig.class...
processing archive D:\Babji Unity\GoogleMobileAds Test\Temp\StagingArea\android-libraries\com.android.support.appcompat-v7-26.1.0\libs\.\classes.jar...
processing android/support/v7/app/ActionBar.class...
processing android/support/v7/app/ActionBar$DisplayOptions.class...
processing android/support/v7/app/ActionBar$LayoutParams.class...
processing android/support/v7/app/ActionBar$NavigationMode.class...
processing android/support/v7/app/ActionBar$OnMenuVisibilityListener.class...
processing android/support/v7/app/ActionBar$OnNavigationListener.class...
processing android/support/v7/app/ActionBar$Tab.class...
processing android/support/v7/app/ActionBar$TabListener.class...
processing android/support/v7/app/ActionBarDrawerToggle.class...
processing android/support/v7/app/ActionBarDrawerToggle$1.class...
processing android/support/v7/app/ActionBarDrawerToggle$Delegate.class...
processing android/support/v7/app/ActionBarDrawerToggle$DelegateProvider.class...
processing android/support/v7/app/ActionBarDrawerToggle$DummyDelegate.class...
processing android/support/v7/app/ActionBarDrawerToggle$HoneycombDelegate.class...
processing android/support/v7/app/ActionBarDrawerToggle$IcsDelegate.class...
processing android/support/v7/app/ActionBarDrawerToggle$JellybeanMr2Delegate.class...
processing android/support/v7/app/ActionBarDrawerToggle$ToolbarCompatDelegate.class...
processing android/support/v7/app/ActionBarDrawerToggleHoneycomb.class...
processing android/support/v7/app/ActionBarDrawerToggleHoneycomb$SetIndicatorInfo.class...
processing android/support/v7/app/AlertController.class...
processing android/support/v7/app/AlertController$1.class...
processing android/support/v7/app/AlertController$2.class...
processing android/support/v7/app/AlertController$3.class...
processing android/support/v7/app/AlertController$4.class...
processing android/support/v7/app/AlertController$5.class...
processing android/support/v7/app/AlertController$AlertParams.class...
processing android/support/v7/app/AlertController$AlertParams$1.class...
processing android/support/v7/app/AlertController$AlertParams$2.class...
processing android/support/v7/app/AlertController$AlertParams$3.class...
processing android/support/v7/app/AlertController$AlertParams$4.class...
processing android/support/v7/app/AlertController$AlertParams$OnPrepareListViewListener.class...
processing android/support/v7/app/AlertController$ButtonHandler.class...
processing android/support/v7/app/AlertController$CheckedItemAdapter.class...
processing android/support/v7/app/AlertController$RecycleListView.class...
processing android/support/v7/app/AlertDialog.class...
processing android/support/v7/app/AlertDialog$Builder.class...
processing android/support/v7/app/AppCompatActivity.class...
processing android/support/v7/app/AppCompatCallback.class...
processing android/support/v7/app/AppCompatDelegate.class...
processing android/support/v7/app/AppCompatDelegate$ApplyableNightMode.class...
processing android/support/v7/app/AppCompatDelegate$NightMode.class...
processing android/support/v7/app/AppCompatDelegateImplBase.class...
processing android/support/v7/app/AppCompatDelegateImplBase$1.class...
processing android/support/v7/app/AppCompatDelegateImplBase$ActionBarDrawableToggleImpl.class...
processing android/support/v7/app/AppCompatDelegateImplBase$AppCompatWindowCallbackBase.class...
processing android/support/v7/app/AppCompatDelegateImplN.class...
processing android/support/v7/app/AppCompatDelegateImplN$AppCompatWindowCallbackN.cla<message truncated>```
4

0 回答 0