java.lang.NoSuchMethodError: org.jetbrains.android.facet.AndroidFacetConfiguration.getModel()Lcom/android/tools/idea/model/AndroidModel

Answered

Hey there. I'm running into this error when running a plugin in Android Studio 4.0 Canary 9.

2020-02-27 11:43:44,009 [ 40310] ERROR - llij.ide.plugins.PluginManager - org.jetbrains.android.facet.AndroidFacetConfiguration.getModel()Lcom/android/tools/idea/model/AndroidModel;
java.lang.NoSuchMethodError: org.jetbrains.android.facet.AndroidFacetConfiguration.getModel()Lcom/android/tools/idea/model/AndroidModel;

Plugin works fine on AS 3.5 and 3.6. Am I missing anything? Thanks!

1 comment
Comment actions Permalink

AndroidFacetConfiguration method is now part of AndroidModel. So these changes should fix it.

From this to this:

AndroidModel model = facet.getConfiguration().getModel();

to this:

AndroidModel model = AndroidModel.get(module);

0

Please sign in to leave a comment.