Foreword: the company uses version 3.0, and its computer is installed with version 2.2.2. The imported project gradle has reported an error, which has been encountered before. The reason for time has forgotten how to solve it, so Google has solved it, and hereby records it in a blog
Error:This Gradle Plugin requires studio 3.0 minimum
error: gradle plug-in requires 3.0 minimum
add this code android.injected.build.model.only.versioned=3
According to the above steps, the problem of gradle plug-in is solved, and an error is reported at runtime
Installation failed with message INSTALL_ FAILED_ TEST_ ONLY.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
No matter you click cancel or OK, the installation is not successful, as shown in the following figure
The solution: still in gradle.properties File addition android.injected.testOnly=false
add android.injected.testOnly=false
Then the problem is solved, the project can run normally on the mobile phone, and can play happily