I'm building an app that uses a Cordova plugin for Google Maps. I keep getting this error and have no clue how to fix it or what it even means. Any help would be appreciated. Here's the error:
* What went wrong:
Execution failed for task ':app:generateDebugBuildConfig'.
> Failed to calculate the value of task ':app:generateDebugBuildConfig' property 'buildConfigPackageName'.
> org.xml.sax.SAXParseException; systemId: file:/C:/Users/Amanda/Desktop/project2/platforms/android/app/src/main/AndroidManifest.xml; lineNumber: 5; columnNumber: 184; The prefix "tools" for attribute "tools:overrideLibrary" associated with an element type "application" is not bound.
And my AndroidManifest.xml:
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="10000" android:versionName="1.0.0" package="com.example.project2" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:supportsRtl="true" tools:overrideLibrary="za.co.twyst">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="#string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="#android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="#string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="com.google.android.geo.API_KEY" android:value="${GOOGLE_MAPS_ANDROID_API_KEY}" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<uses-library android:name="org.apache.http.legacy" android:required="false" />
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-feature android:name="android.hardware.location" />
<uses-feature android:name="android.hardware.location.gps" />
</manifest>
Error
org.xml.sax.SAXParseException;
systemId: file:/C:/Users/Amanda/Desktop/project2/platforms/android/app/src/main/AndroidManifest.xml;
lineNumber: 5; columnNumber: 184;
The prefix "tools" for attribute "tools:overrideLibrary" associated with an element type "application" is not bound.
As you can see the error is in line no 5 and column no 184.As suggested i think you are missing the name space
xmlns:tools="http://schemas.android.com/tools"
Add this to your manifest so that your manifest will look something like this
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true"
android:versionCode="10000"
android:versionName="1.0.0"
package="com.example.project2"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:supportsRtl="true" tools:overrideLibrary="za.co.twyst">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="#string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="#android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="#string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="com.google.android.geo.API_KEY" android:value="${GOOGLE_MAPS_ANDROID_API_KEY}" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<uses-library android:name="org.apache.http.legacy" android:required="false" />
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-feature android:name="android.hardware.location" />
<uses-feature android:name="android.hardware.location.gps" />
</manifest>
Related
I'm using a project downloaded from codecanyon.net, the project fails Gradle build with an error message. I tried reviewing other questions with a similar issue but none worked for me. Please anybody can help me fix this issue
Cause: duplicate entry: AndroidManifest.xml
Below is the manifest 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.dreams.chat">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
android:name=".BaseApplication"
android:allowBackup="false"
android:appComponentFactory="whateverString"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_logo_"
android:label="#string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup,android:appComponentFactory">
<activity
android:name=".activities.MainActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".activities.ChatActivity"
android:parentActivityName=".activities.MainActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize">
<!--android:windowSoftInputMode="stateHidden|adjustResize|adjustPan">-->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity android:name=".activities.ImageViewerActivity" />
<service
android:name=".services.FirebaseChatService"
android:enabled="true" />
<service android:name=".services.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<receiver
android:name=".receivers.ConnectivityReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"
tools:ignore="BatteryLife" />
</intent-filter>
</receiver>
<!-- https://developers.google.com/places/android-sdk/signup -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<provider
android:name=".utils.MyFileProvider"
android:authorities="#string/authority"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
<activity
android:name=".activities.ContactViewerActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".activities.ChatDetailActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".activities.SignInActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoTitle"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".activities.CallScreenActivity"
android:screenOrientation="portrait" />
<activity
android:name=".activities.IncomingCallScreenActivity"
android:screenOrientation="portrait" />
<activity
android:name=".activities.SplashActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoTitle"
android:windowSoftInputMode="stateHidden|adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".services.FetchMyUsersService"
android:exported="false" />
<service
android:name=".services.SinchService"
android:enabled="true"
android:exported="false" />
<activity
android:name=".activities.ChooseSignInActivity"
android:label="#string/title_activity_choose_sign_in"
android:theme="#style/AppTheme" />
<activity
android:name=".activities.ContactActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".activities.PrivacyPolicyActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<meta-data
android:name="com.dreams.chat.status.glideProgressBar.OkHttpProgressGlideModule"
android:value="GlideModule" />
<activity
android:name=".activities.StatusStoriesActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/FullScreenVideoTheme" />
<activity
android:name=".activities.CallListActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize|adjustPan" />
</application>
</manifest>
and this is the excception detailed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform timezago-1.1.8.aar (com.chootdev:timezago:1.1.8) to match attributes {artifactType=android-assets, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: C:\Users\JRAR\.gradle\caches\modules-2\files-2.1\com.chootdev\timezago\1.1.8\a988a24719cbe07115df73a045aa251630cdb10\timezago-1.1.8.aar.
> Failed to transform 'C:\Users\JRAR\.gradle\caches\modules-2\files-2.1\com.chootdev\timezago\1.1.8\a988a24719cbe07115df73a045aa251630cdb10\timezago-1.1.8.aar' using Jetifier. Reason: ZipException, message: duplicate entry: AndroidManifest.xml. (Run with --stacktrace for more details.)
Please file a bug at http://issuetracker.google.com/issues/new?component=460323.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
The issue was with allowbackup and appComponentFactory. I found lead to my solution in this question, if logs and build is not providing enough details about the issue, do check merged manifest it show errors with suggestions.
Open application manifest (AndroidManifest.xml) and click on Merged Manifest (in bottom) see image below.
I have upload my application is Play Store in Beta test, but all my device said : your device is not compatible with this version. When I check Google Play Console it said that 0 device are compatible with my app, why?
My AndroidManifest.xml :
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.luzwitz.mapsroute">
<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.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
android:name=".MyApplication"
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_API_KEY" />
<service android:name=".service.LocationMaps" />
<service android:name=".service.MessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<activity
android:name=".activities.ActivityHome"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.Launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.ActivityLogin"
android:screenOrientation="portrait" />
<activity
android:name=".activities.ActivityRoute"
android:label="#string/title_activity_register"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".activities.ActivityMaps"
android:screenOrientation="portrait" />
<activity
android:name=".activities.ActivityFriendly"
android:label="#string/title_activity_friends"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".activities.ActivityMessage"
android:label="#string/title_activity_messaging"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".activities.ActivityAlert"
android:label="#string/title_activity_maps"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
</application>
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
So I am doing a little something in Android and this error comes up:
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
I cant install the app please help! My AndroidManifest is follow: Please have a look and help me!
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18"
/>
<application
android:name=".MyApplication"
android:allowBackup="true"
android:label="#string/app_name"
android:theme="#style/AppTheme"
>
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<meta-data
android:name="android.app.searchable"/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
== <meta-data
android:name="android.app.searchable"/>
</activity>
</application>
My bad I had not added the Name-Value pair for Meta Data (Value part) so the meta data had only Name and no values. When I deleted all the meta datas I resolved it for now.
Thanks
In my application i have to do some changes in the manifest file. but i failed to do changes the manifest file. Please help me how do i change the manifest file in android?
manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.reloadapp.reload"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<application
android:allowBackup="true"
android:icon="#drawable/re"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.reloadapp.reload.fragments.SplashActivity"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".fragments.SplashActivity" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.reloadapp.reload.fragments.MainActivity"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.DateofBirth_Activity"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" >
</activity>
<activity
android:name="com.reloadapp.reload.fragments.Webviewfreecredits"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.PaymentFailure"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.Payment_Success"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.Pic"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.Resetpassword_Activtiy"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.Login_Activity"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.Facebookwebview"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.Register_Activtiy"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.ForgotPassword_Activity"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.Payment_Actiivity"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.Atmdebitwebview"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.reloadapp.reload.fragments.Netbanking_Webview"
android:icon="#drawable/logo"
android:windowSoftInputMode="stateHidden" />
</application>
</manifest>
i want to remove the android:icon in every activity and save. please help me.
Check if the logo file name have any numbers, remove it and rename it by letters only