Android Studio projects are divided into Application Module and Library Module. Check whether the Traffic you imported belongs to Application or Library. You can see from the first line of build.gradle that Application is 'com.android.application'. Library is 'com.android.library'. If it is Library, do not import it directly through Import project. You must import Application first and then Import Module to Library.
1. My colleagues here also had this problem. When importing the project, it was not the build.gradle in the project root directory that was imported, but the build.gradle in the app directory, which caused such a problem 2. Importing the project root directory build.gradle
Android Studio projects are divided into Application Module and Library Module. Check whether the Traffic you imported belongs to Application or Library. You can see from the first line of build.gradle that Application is 'com.android.application'. Library is 'com.android.library'. If it is Library, do not import it directly through Import project. You must import Application first and then Import Module to Library.
1. My colleagues here also had this problem. When importing the project, it was not the build.gradle in the project root directory that was imported, but the build.gradle in the app directory, which caused such a problem
2. Importing the project root directory build.gradle