Error: tools:replace specified at line:8 for attribute
android:appComponentFactory, but no new value specified RestfulAPI.app
main manifest (this file), line 7 Error
Validation failed, exiting
RestfulAPI.app main manifest (this file)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.restfulapi">
<uses-permission android:name="android.permission.INTERNET" />
<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.RestfulAPI"
tools:replace="android:appComponentFactory">
<activity
android:name=".DataViewActivity"
/>
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
add this line in your application tag.
tools:replace="android:appComponentFactory"
android:appComponentFactory="#string/application _name"
Related
The app works as expected. - it is only the IDE that apparently fail to upload/run it.
05/15 14:37:53: Launching 'app' on Google Glass 1. Install
successfully finished in 1 s 954 ms. Could not identify launch
activity: Default Activity not found Error while Launching activity
My manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="no.ut.glassbrowser"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name">
<activity
android:immersive="true"
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger" />
</activity>
</application>
</manifest>
What Am I missing?
In your "intent-filter" tag you should have this code
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
I accidentally changed something in the manifests file I deleted a paragraph that had meta_Data in it and had something with respurce.
I can't recover it, so Android Studio doesn't run the app on the phone. I think that's why.
If there is another reason or solution for someone I would be happy.
Thank you .
this error :
Installation did not succeed. The application could not be installed: INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION Installation failed due to: 'null'
> <?xml version="1.0" encoding="utf-8"?> <manifest
> xmlns:android="http://schemas.android.com/apk/res/android"
> package="com.lee.app1_new">
>
> <uses-permission android:name="android.permission.INTERNET" />
> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
>
> <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>
> <activity android:name=".newRecipe" />
> <activity android:name=".category" />
> <activity android:name=".recipe_cake" />
> <activity android:name=".full_recipe_cake" />
> <activity android:name=".add_recipe" />
> <activity android:name=".my_recipes" />
> </ap
plication>
</manifest>
Try this manifest file your was misplaced
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lee.app1_new">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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>
<activity android:name=".newRecipe" />
<activity android:name=".category" />
<activity android:name=".recipe_cake" />
<activity android:name=".full_recipe_cake" />
<activity android:name=".add_recipe" />
<activity android:name=".my_recipes" />
</application>
</manifest>
I have an app I was working on a few months ago. Today I opened it again in Android Studio 3.4 and when syncing it asked if OK to upgrade to the current version of Gradle and the Gradle plug-in. I agreed and I now get an XML parsing error in the manifest.
The manifest is here, I added a comment to signal where I get the error:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.schalkx.alarmapp01">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<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.AppCompat">
<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=".SetAlarmActivity">
android:label="Alarm Settings"
android:parentActivityName=".MainActivity" <!-- *** I GET THE ERROR HERE *** -->
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity android:name=".ShowClockActivity">
android:label="Desktop Clock"</activity>
<receiver android:name=".AlarmReceiver" />
<activity
android:name=".UserResponseActivity"
android:label="#string/title_activity_user_response" />
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
</application>
</manifest>
I did some tests adding a new activity and I noticed that the syntax is now generated a bit differently, and would start like this:
<activity
android:name=".SetAlarmActivity"
android:label="Alarm Settings"
android:parentActivityName=".MainActivity"
....
That is, the ">" is not added at the end of
<activity android:name=".SetAlarmActivity">
but later on. Trouble is I haven't been able to get the syntax right.
Any ideas what's wrong?
Thanks!
It should be
<activity android:name=".SetAlarmActivity"
android:label="Alarm Settings"
android:parentActivityName=".MainActivity"> //<--Notice
Instead of
<activity android:name=".SetAlarmActivity"> //<--Notice
android:label="Alarm Settings"
android:parentActivityName=".MainActivity"
I Work with Android Studio 3.2 and i have problem with Run app because not working and get me "App Default Activity not found"
Problem -> https://imgur.com/a/2Q0SGUq
This code is manifest for app
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.erik.firebaseauthdemo">
<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>
<activity android:name=".LoginActivity" />
<activity android:name=".RegisterActivity" />
<activity android:name=".ForgetAndChangePasswordActivity"></activity>
</application>
</manifest>
This is the manifest file
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permissions.READ_GSERVICES" />
<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">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".Map"
android:label="#string/title_activity_map">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
This app is suppose to find nearby places but whenever i click the button to search nearby places, it crashes
This is the logcat image but i dont understand