I keep getting this error when I try to run my android studio. I tried to copy, paste my previous project bit by bit. After I finished it I got this error. I'm really stuck on this one.
Thanks in advance :D
This is my Activity manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.iussystem">
<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=".TermsOfService"></activity>
<activity android:name=".ForgotPassword" />
<activity android:name=".Registracija" />
<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>
If you are saying your app is in com/example/iusystem/MainActivity.java, isnt that a typo?
Either change your package:
package="com.example.iussystem"
to
package="com.example.iusystem"
Or move your activity the other way.
Related
So I have a problem where I made a GUI for login window in android studio.But when I try to start the app,it doesn't pop up.Also I have made a splashcreen which I want to pop up before login screen and it does.Also,I didnt do anything in the LoginActivitiy file which was created.I can't find the problem.Here is the manifest file.
Btw Im a beginner,go easy on me :)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.projekat2021">
<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/Theme.Projekat2021">
<activity android:name=".MainActivity" />
<activity android:name=".SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity" />
</application>
</manifest>
How can edit the manifest so the MainActivity is removed?
I've been following some tutorials to learn to create android apps and I've got stuck in the Activity subject.
When I create a project the Software gives me an deafult activity called MainActivity. I've deleted it so I could name my class as I wish.
However, even after deleting the files the activity still presents on the Manifest. I've tried to play around, deleting some words, but with no success.
This is the current manifest file:
<?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">-------<<<<<<0!!!!!!!!!!!!!
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
It has this row of content that the android studio warns me about, that I'm poiting with -------<<<<<<0!!!!!!!!!!!!!.
I recall my question: How can edit the manifest so the MainActivity is removed?
Remove the MainActivity Java file and Manifest Declaration and activity1 set as a LAUNCHER Activity
<?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">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activity2" />
</application>
</manifest>
You can create manifest like this if you want to use other activity
<?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">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activity2" />
</application>
</manifest>
This below code make activity as Main and first launched :
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Can you help me please?
When I try to run, the compiler show me this. Some idea? Thanks
This is the AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.cyrax.rocas">
<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>
<activity android:name=".Infoclase"></activity>
</application>
</manifest>
Clean your project and rebuild it.
I get an error in my manifest.xml which I can't seem to solve.
The error is:
Manifest file doesnt end with an final newline.
The error occures right before the last </application>.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.matthias.w_seminar">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainMenu"
android:theme="#android:style/Theme.Holo.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Difficulty"
android:theme="#android:style/Theme.Holo.NoActionBar"
/>
<activity android:name=".GameNormal"
android:theme="#android:style/Theme.Holo.NoActionBar"
/>
</application>
</manifest>
Click on the word with the red line (that causes the mentioned error), then click Alt+Enter and choose
Un-inject Language/Reference
You can also try to copy your manifest content, delete original manifest file and create new one like this :
getting this error after gradle build:
RuntimeException: Could not read Manifest data: Activity name cannot
be empty.
Took help from here:
http://www.vogella.com/tutorials/AndroidLibraryProjects/article.html
http://marker.to/Ltdy79
But i have my activity name:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.librarypro">
<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>
you have not specified a name for one of your activities in the androidmanifest.xml. Enter a name and you should be good.