Activity class {****} does not exist

This error when compiling run apk

1, first check this MainActivity.java is not really there, and the package name and the correct path;

2. If the file exists, and the package name and path is no problem, then open the file you /android/app/build.gradle project is located, delete applicationId under defaultConfig, or the value of applicationId the manifest file into the specified package.

This problem occurs because the inconsistency of your package and applicationId. If you do not define applicationId build.gradle in your file, this package applicationId will default to the same value as specified in AndroidManifest.xml.

3. If nothing appears on the phone or error occurs running on another phone running the wrong, then you can not locate the problem for mobile phones unload the remaining cache, the solution is a mobile phone connected to the computer with the command adb adb uninstall xxx.xxx .xxx (package name)

If Success appears that success can continue to run. Some phones will appear this residual problem unloading

Guess you like

Origin www.cnblogs.com/vampire-diaries/p/12193530.html