I've been trying to make an app. I've finished it with no errors, but when I install it on my device I can't open it.
I've searched for the solution on here, but nothing has helped. Most people post their AndroidManifest, so here it is.
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"></application>
<activity android:name="Main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Any help is much appreciated. Thanks!
Related
I'm a beginner in Android.
Every time when I open class teacher's project to my system it shows this error.
Error running app: Default activity not found.
What should I do to match the same project as my teacher's?
I've tried many solutions.
My Manifest file is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.assigncheckbox">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
maybe it happen because you didn't add this activity to your AndroidManifest.xml
<activity
android:name=".yourActivity"
/>
I have previously ran projects and they not only run but save as apps that I can open again later. Now for some reason this particular projects runs and opens but does not save as an app on my phone.
I'm sure I must be missing some simple setting but I can't find any solutions, any help would be appreciated.
Thanks
edit: I am using a Samsung s10 5g, I am coding in Kotlin, I didn't think these things were relevant because I can run my other projects which were also coded in Kotlin and those will save as normal apps on my phone.
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".Pythagorean">
</activity>
<activity
android:screenOrientation="portrait"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN">
</action>
</intent-filter>
</activity>
</application>
Go to Settings -> apps -> (find the application by name) -> uninstall for all users (Depends upon the device you are using)
Then run your app again via Android Studio in your phone. Check if it helps.
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".Pythagorean">
</activity>
<activity
android:screenOrientation="portrait"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Im taking the udacity coarse and for some reason android studio wont recognize my MainActivity class. Ive tried cleaning the project, rebuilding and making sure that the names were correct but nothing has solved my problem.
Android Manifest code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="androidedx.example.activitylifecycle">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Activity1"></activity>
<activity android:name=".Activity2" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Found the problem, this package name within the code I had to paste
package com.example.android.cookies;
Im not sure why specifically this caused the problem but atleast I solved it.
I wanted to learn how to make android apps and downloaded android studio.
But when I made my first project and it was trying to sync an error came. This is what it said: A problem occurred configuring project ':app'.
When i went to Android Manifest most of it was red. Does someone know what to do?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.oliver.mycart">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:abel="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".Menu"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
android:abel="#string/app_name"
you have error in this line. Try to change abel to label
I am a complete beginner in Android and as the title says my application is not showing up in the emulator (tried all the solutions on stackoverflow)
troubleshooting that i did:
1)used genymotion
2)made sure that I have `
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>`
3)unchecked the ABD integration
4)the same version for the SDK
5)installed HAXM at a previous point and made sure from the BIOS that the visualization is enabled
My complete Mainfest after many editing
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lenovo.myapplication">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Try to build the apk independently then drag and drop it into the genymotion emulator.