Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Monday, April 8, 2019

The default Activity not found

Error : The default activity not found.

Solution:

1. Are you sure , your main activity is declared in Manifest xml ? If not , please declare and run app. It will work. Make sure only main activity name you can change. Other like Intent filter, you shoul not touch.

2. If above solution is not workout, try Run -> Edit Config-> Choose your correct activity or define default activity.

3. If above also not workout like you defined everything well, but still error coming. Please do File -> Invalidate cache and restart.

4. If above also not work, this is the final solution File -> Sync with Gradle. Definitely It will work.


Wednesday, February 20, 2019

Could not find method versioncode () for arguments 1.1 on defaultconfig

This problem came, when I tried to upload an apk to playstore with version changes. Means, I launched my second version and got this error.

Solution:

Go to you build.gradle(app) and make changes like below. It will work.
minSdkVersion 15targetSdkVersion 26versionCode 2.0.toInteger() // This is what I changed
versionName "2.0"