java.lang.ClassNotFound:在路径:DexPathList上找不到类“ android.support.multidex.MultiDexApplication”。>

问题描述 投票:0回答:1

我正在尝试在我的react-native应用程序上启用multidex,但启动该应用程序时出现错误。

我已经在android的官方文档中做了这些步骤:https://developer.android.com/studio/build/multidex

我的build.gradel(android / app / build.gradel)

 defaultConfig {
        ....
        versionName "1.0"
        multiDexEnabled true
    }

    ...

    dependencies {
      implementation 'com.android.support:multidex:1.0.3'

      implementation fileTree(dir: "libs", include: ["*.jar"])

      implementation "com.facebook.react:react-native:+"  // From node_modules

      implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

       ...
    }

还有我的AndroidManifest.xml:

<application
  android:name="android.support.multidex.MultiDexApplication"

  android:label="@string/app_name"
  android:icon="@mipmap/ic_launcher"
  android:roundIcon="@mipmap/ic_launcher_round"
  android:allowBackup="false"
  android:theme="@style/AppTheme">

  ...

</application>

我不明白问题是什么,为什么当我启动应用程序时错误总是发生。

我使用react-native V0.62.2

我正在尝试在我的react-native应用程序上启用multidex,但启动该应用程序时出现错误。我已经在android的官方文档中做了以下步骤:https://developer.android.com/studio/build / ...

android react-native android-multidex
1个回答
0
投票

java.lang.ClassNotFound:找不到类 路径上的“ android.support.multidex.MultiDexApplication”:DexPathList

© www.soinside.com 2019 - 2024. All rights reserved.