更新时间:2021-10-07 05:53:20
创建一个类,将其命名为 App
并从 MultiDexApplication
进行扩展,如下所示:
create a class lets name it App
and extend from MultiDexApplication
like this:
import android.support.multidex.MultiDexApplication;
public class App extends MultiDexApplication {
//you can leave this empty or override methods if you like so the thing is that you need to extend from MultiDexApplication
}
在清单中添加 App
作为应用名称,就像这样
in your manifest add App
as your application name just like this
<application
android:name=".App" // <<< this is the important line!
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
添加完所有内容后,进行一个干净的构建,它现在应该可以工作了:).
After adding everything make a clean build and it should work now :).