Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Error while Launching activity

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I recently upgraded to 3.6.1.
I opened project which is developed in older version.
I migrated to AndroidX (Refractor--->migrate to Androidx).
When i try to test in my motog 6 mobile by connecting through USB i am getting the following error.

------------------------------------------------------------------------------
$ adb shell am start -n "com.any.search.android.training/com.any.search.training.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "com.any.search.android.training/com.any.search.training.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.any.search.android.training/com.any.search.training.MainActivity }
Error type 3
Error: Activity class {com.any.search.android.training/com.any.search.training.MainActivity} does not exist.

Error while Launching activity
------------------------------------------------------------------------------

I have tried option File-->Invalidate cache, Build--> Clean Project , Build-->Rebuild Project and deleted directory .gradle and .idle.
Uninstalled old app from mobile.
Restart the Android studio but it did not work.


contents of local.propoerties.
ndk.dir=C\:\\Users\\Hp\\AppData\\Local\\Android\\sdk\\ndk-bundle
sdk.dir=C\:\\Users\\Hp\\AppData\\Local\\Android\\Sdk

When i try to run in debug mode iam getting the same error.
 
Saloon Keeper
Posts: 6380
158
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
com.any.search.android.training/com.any.search.training.MainActivity

What is the package name, with or without "android"? Is that consistent everywhere?
 
mohana krishna
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi  Tim Moores ,

Thanks for your help.
Changed applicationId to  "com.any.search.training"  from "com.any.search.android.training"".
Then this issue is resolved.

Regards,
Mohan
 
There's a city wid manhunt for this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic