I have an INTELIJ(v12) android project successfully imported to AndroidStudio(v0.4.0). It works perfectly if I don't change anything in manifest. When I want to change the launcher activity and run, it outputs with the following error:
Launching application: com.trackingeng/LandingActivity.
DEVICE SHELL COMMAND: am start -D -n "com.trackingeng/LandingActivity"
-a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] cmp=com.trackingeng/LandingActivity }
Error type 3
Error: Activity class {com.trackingeng/LandingActivity} does not exist.
When I click Sync Project with Gradle files it outputs:
Project Sync
The project 'TrackingEng' is not a Gradle-based project
Anyone has faced this problem? Any ideas?
Run settings:
Try changing the name of the Activity in your
AndroidManifest.xml
file.Right now it says:
Try either adding a period to the beginning of the Activity's name:
Or adding the package name to the beginning of the Activity's name:
It also may be a problem that your package name has only two components separated by periods (your package name is "com.trackingeng"; a more standard package name would be "com.trackingeng.app")
In my case there was next reason:
I have 2 users: me and Guest. and app was installed on both of them but deleted only at first.
when I switched to Guest screen and delete app from there, app installed ok.
hope this will help someone :)
None of the above worked for me. I had a version of the app on the device that could not be uninstalled as it was corrupt somehow. I had to factory reset the device. Not too bothered cause it was a just a dev device
In my case, it was because the app I was trying to launch was installed for a different user on the device. Go to Settings -> Apps (All apps) and and select the app. Click on the overflow menu and select "Uninstall for all users". This should solve the problem.
Be warned that if you have multiple Profiles set on the device, your app might already exist in one of the other Profiles.
Uninstalling the app from all the Profiles resolved the issue for me.
I have LG Stylus and in my test phone, application isn't remove permanently. In Settings -> Application I found debug app (which I try install and debug by AS) with adnotation turn-off. When I remove app from my phone, error disappeard.