I have two android applications using google analytics. I setup it as instruction in this link:
https://developers.google.com/analytics/devguides/collection/android/v4/
But, when I install this two apps, I received error
INSTALL_FAILED_CONFLICTING_PROVIDER
I don't use provider with android:authorities
My application tag in manifest as below
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:name="android.support.multidex.MultiDexApplication">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<activity
android:name="com.game.gdx.android.AndroidLauncher"
android:label="#string/app_name"
android:screenOrientation="sensorLandscape"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.game.gdx.android.WebViewActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:screenOrientation="sensorLandscape"
android:label="#string/app_name" />
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
</application>
The authority that is listed in android:authorities must be unique. See this link for more info: http://developer.android.com/guide/topics/manifest/provider-element.html#auth
One last hing to check, make sure in both of your manifests you have same package name is defined. Use this same package name to get the google analytics configuration file.
<manifest package="com.your.program" ... >
After completing that make sure you uninstall your both apps and install again.
Related
I'm getting the error "You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported" when i'm trying to upload the app on google play, i have added android:exported wherever intent-filter service was.
App not uploading on play store due to android:exported error
My Mainfest File
<application
android:name="com.kashmirstudentupdate.ksu.MyApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true">
<activity android:name="com.kashmirstudentupdate.ksu.activity.SplashActivity"
android:exported="true"
android:theme="#style/AppTheme.NoActionBar2">
<intent-filter>
<action android:exported="true" android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.kashmirstudentupdate.ksu.activity.MainActivity"
android:configChanges="screenSize|orientation"
android:theme="#style/AppTheme.NoActionBar">
</activity>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/admob_app_id" />
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
</application>
I am launching my android app from android studio, the app is working fine but unable to launch it from the launcher as it is not showing up there. Looking at other posts it seems that this issue could be because of incorrect AndroidManifest.xml, but mine seems to fine based on other answers.
Below is AndroidManifest.xml from my project.
Full file is here -> https://pastebin.com/E7KMxQZD
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
I have some problem with facebook SKD. I get invalid app ID when I am trying to login. Can you please help me figure out what the problem is?
My facebook app looks like this:
Manifest:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.facebook.FacebookActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="70208723325****" />
</application>
In case anyone has this problem, I fixed it with not putting the appId value directly in the manifest file. Instead you should put it in strings and then in manifest you put
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
It's strange but it works for me.
1.Try to change the facebook status and review as yes.
2.Enter the Key hash value (Setting -> keyhash).
I have taken a picture of the Facebook instruction below. What is wrong with it? My app keeps crashing with exception concerning ApplicationId should not be null. But I have added my app id as <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/> in the manifest; that is after adding it as a string in the strings.xml resource as <string name="facebook_app_id">0000000000</string>
So I figure the instructions is wrong because it does not say which uses-permission to add and it says to call the string resource key com.facebook.sdk.ApplicationId with value Facebook_app_id. Here is the link https://developers.facebook.com/docs/android/getting-started#eclipse
Quite simply
1.) Create app on Facebook, get the app_id that you will subsequently use to attach to your app.
2.) Define your applicationId in the AndroidManifest.xml like this:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
under <application android:label="#string/app_name".... tag
where app_id is a string within your strings.xml.
Example (Facebook Sample application):
<application android:label="#string/app_name"
android:icon="#drawable/icon"
android:theme="#android:style/Theme.NoTitleBar"
>
<activity android:name=".HelloFacebookSampleActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
</application>
Note the value added under the <application> tag
and in strings.xml (MAKE SURE TO DO THIS)
<string name="app_id">xxxxxxxxxxxx</string>
3.) Set permissions in manifest
<uses-permission android:name="android.permission.INTERNET"/>
This is an android requirement, so the app can access the internet.
So with permissions the above manifest will look like
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="#string/app_name"
android:icon="#drawable/icon"
android:theme="#android:style/Theme.NoTitleBar"
>
<activity android:name=".HelloFacebookSampleActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
</application>
I had the same problem. And here is how I solved it — I think. At least after doing these things, the problem went away.
in strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
….
<string name="com.facebook.sdk.ApplicationId">facebook_app_id</string>
<string name="facebook_app_id">111111111</string>
….
</resources>
in manifest
<application
… >
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
</application>
</manifest>
Notice there are two entries in the strings.xml file.
I am trying to add a second activity to my android manifest file but am receiving a INSTALL_PARSE_FAILED_MANIFEST_MALFORMED error. I have isolated the offending code to this line:
<activity android:name="com.MyPackage.Main.FacebookLoginActivity"
android:label="Facebook"></activity>
When I type it in like this
<activity android:name=".FacebookLoginActivity"
android:label="Facebook"></activity>
it works fine but when I try to start the activity via
this.startActivity(new Intent(this, FacebookLoginActivity.class));
I get an error saying cannot locate "com.MyPackage.Main/com.MyPackage.Main.FacebookLoginActivity".
Is that activity wrong in some way?
Here a portion of my manifest file:
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:allowBackup="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation"
android:label="#string/app_name"
android:theme="#style/Theme.NoBackground">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.MyPackage.Main.FacebookLoginActivity" android:label="Facebook"></activity>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
</application>
Try changing you package declaration to com.mypackage.main.
Your class name would be com.mypackage.main.FacebookLoginActivity