How to import class from another module in android studio?

前端 未结 3 608
孤城傲影
孤城傲影 2020-12-29 01:12

I created two modules in single android project, named it x and y.

  1. Module x has a class Egg (Package: com.example.x)
  2. Module y has a class Foo (Package
3条回答
  •  一个人的身影
    2020-12-29 02:01

    now when create new module,settings.gradle add automatically this module.after that u should add this line:

        dependencies {
        implementation(
        ...,
        ..,
                project(":y")
    )
    }
    

提交回复
热议问题