Using Fabric with Multidex with an exported Unity project

后端 未结 2 659
野的像风
野的像风 2021-01-24 00:02

I have exported my Unity project to be able to use multidex. Problem is I have to set the android:name in the project\'s androidmanifest to \"android.support.multidex.MultiDexAp

2条回答
  •  情歌与酒
    2021-01-24 00:06

    Add next lines to your Application method:

    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        // this one is needed to enable multidex in your application
        MultiDex.install(this);
    }
    
    public void onCreate() {
        super.onCreate();
        // this one is needed to init the Fabric SDK
        FabricInitializer.initializeFabric(this, FabricInitializer.Caller.Unity);
    }
    

    Also, one more solution you can check here, I created a small GitHub repo with description how to make it in few clicks.

提交回复
热议问题