My app doesn't appear in the apps dashboard and if I open it from the Applications list in the settings, the "start" button is disabled, I suspect is a misconfiguration in my AndroidManifest.xml but have no idea what exactly is wrong in it.
This is the code of my manifest file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.designhunter"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:host="auth-callback" android:scheme="designhunter" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
According to this Action main does not expect to receive it data, but you have data tag. If you remove it (and the view action because it is required) it should work
Related
I'm working on a app in Xamarin Android and got stuck on this error, after changing target sdk/Android version from Android 9 to Android 10:
my AndroidManifest (in Visual Studio!):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.7.1" package="com.INCREDIBLE.Video2mp3" android:installLocation="auto" android:versionCode="3">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" />
<application android:allowBackup="true" android:label="#string/app_name" android:roundIcon="#drawable/micon" android:supportsRtl="true" android:theme="#style/AppTheme" android:icon="#drawable/micon">
<activity android:name=".MainActivity" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="Download als mp3">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
</application>
<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_EXTERNAL_STORAGE" />
</manifest>
But in the Solution folder the Manifest looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.7.1" package="com.INCREDIBLE.Video2mp3" android:installLocation="auto" android:versionCode="3">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<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_EXTERNAL_STORAGE" />
<application android:allowBackup="true" android:label="#string/app_name" android:roundIcon="#drawable/micon" android:supportsRtl="true" android:theme="#style/AppTheme" android:icon="#drawable/micon" android:name="android.app.Application">
<activity android:name=".MainActivity" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="Download als mp3">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<activity android:icon="#drawable/micon" android:label="#string/app_name" android:launchMode="singleTask" android:name="com.INCREDIBLE.Video2mp3.MainActivity" android:theme="#style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="1999999999" android:authorities="com.INCREDIBLE.Video2mp3.mono.MonoRuntimeProvider.__mono_init__" />
</application>
</manifest>
The App should only have one Activity (MainActivity). If deleting the 'duplicated' <activity ... /> (in the file directly) I get no error massage, but the build fails anyways. Before the version changed from 9 to 10, it worked as expacted. Now (even when I change the target Version back to 9) I get stuck here.
In Xamarin, you don't need to explicitly register Activities in the Manifest. You can delete all activity code from the manifest and use Attributes in the source file like so:
[Activity(MainLauncher = true, LaunchMode = LaunchMode.SingleTask)]
[IntentFilter(new[] { "android.intent.action.SEND" }, Label = "Download als mp3", Categories = new[] { "android.intent.category.DEFAULT" }, DataMimeType = "text/plain")]
public class MainActivity: Activity
{
Note: You may be doing both due to which a second entry for the activity maybe gets added to the manifest when you build the project
When I install my app in my tv, I can run it and do everything but I do not know why app icon not showing on the home screen of the tv. Mainly its not displaying in 1080p Tv's
Here is my AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.demo.tv">
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<permission
android:name="com.app.demo.tv.ACCESS_VIDEO_DATA"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".Application"
android:allowBackup="true"
android:banner="#drawable/app_icon"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".HomeActivity"
android:label="#string/app_name"
android:theme="#style/HomeTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/LandingAndOtherTheme" />
</application>
</manifest>
Just declare icons inside leanback launcher activity
<activity
...
android:banner="#drawable/main_logo"
android:icon="#mipmap/ic_launcher"
android:logo="#mipmap/ic_launcher"
...
>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
When i install my android application on the device, the AppIcon will appear twice.
This means: there are two separate app-icons. Both icons launch the same app version. If I remove one app-icon, the other disappears also. If i reinstall them, it appears twice again.
How can i avoid this?
This is my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.******"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:theme="#style/AppTheme">
<meta-data android:name="com.bugsnag.android.API_KEY"
android:value="524b0194108e90ae383189e509746766"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
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.react.devsupport.DevSettingsActivity" />
<activity
android:name=".SplashActivity"
android:theme="#style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
It's because of the intent-filter. Only one activity should have
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Any activity having this intent filter will be shown in the launcher.
So I need to integrate unity with android feature like connect to 3rd party app.
So I made .apk build after working at eclipse, but how to integrate between 2 AndroidManifest files?
First reference one is,
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mygame.plugin"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<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>
<intent-filter>
<data android:scheme="ka67492508561297" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.kakao.unity.plugin.ThirdPartyPostStoryActivity" android:windowSoftInputMode="stateAlwaysVisible" android:theme="#android:style/Theme.Translucent.NoTitleBar"/>
</application>
<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_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
and the main one my game currently uses is
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mygame.mygame1"
android:installLocation="preferExternal"
android:theme="#android:style/Theme.NoTitleBar"
android:versionCode="2"
android:versionName="1.01">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name">
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version"/>
<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>
<intent-filter>
<data android:scheme="ka7492508561297" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.unity3d.player.UnityPlayerProxyActivity"
android:launchMode="singleTask"
android:label="#string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:launchMode="singleTask"
android:label="#string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
</activity>
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
android:launchMode="singleTask"
android:label="#string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
<activity android:name="org.onepf.openiab.UnityProxyActivity"
android:launchMode="singleTask"
android:label="#string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:label="#string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
</activity>
<activity android:name="com.ka.unity.plugin.ThirdPartyPostStoryActivity" android:windowSoftInputMode="stateAlwaysVisible" android:theme="#android:style/Theme.Translucent.NoTitleBar"/>
</application>
<uses-permission android:name="com.android.vending.BILLING"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.sec.android.iap.permission.BILLING"/>
<uses-permission android:name="org.onepf.openiab.permission.BILLING"/>
So I merged reference one to my main one like above,
But error says,
[UnityException: Unable to start activity!
No activity in the manifest with action MAIN and category LAUNCHER. Try launching the application manually on the device.]
I still can make .apk file, and can run on my phone, but can't connect to 3rd party app when in-game button touched that should launch connection.
So strange... how should I fix?
Thanks.
i am working on an app in witch i am performing two launches from one installation. my both launcher are working fine for there separate individual tasks.
but my problem is: i am getting same name or same icon for both launcher.
i want two different icon and name for both launchers.
this is my manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="info.androidhive.awesomewallpapers"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- Start Wallpaper App -->
<application
android:name="info.androidhive.awesomewallpapers.app.AppController"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/FreeWallTheme" >
<activity
android:name="info.androidhive.awesomewallpapers.SplashActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="info.androidhive.awesomewallpapers.MainActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="info.androidhive.awesomewallpapers.FullScreenViewActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="info.androidhive.awesomewallpapers.SettingsActivity"
android:label="#string/action_settings"
android:screenOrientation="portrait" >
</activity>
<!-- End Wallpaper App -->
<!-- Start Crop App -->
<activity
android:name="info.androidhive.awesomewallpapers.CropWallpaper.FolderListScreen"
android:configChanges="orientation|keyboard|keyboardHidden|screenLayout|fontScale|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
<activity
android:name="info.androidhive.awesomewallpapers.CropWallpaper.ImageListScreen"
android:configChanges="orientation|keyboard|keyboardHidden|screenLayout|fontScale|screenSize"
android:label="#string/app_name" >
</activity>
<activity
android:name="info.androidhive.awesomewallpapers.CropWallpaper.MyPrefScreen"
android:configChanges="orientation|keyboard|keyboardHidden|screenLayout|fontScale"
android:label="#string/app_name" >
</activity>
<activity
android:name="info.androidhive.awesomewallpapers.CropWallpaper.CropWallpaper"
android:configChanges="keyboard|keyboardHidden|fontScale"
android:label="#string/app_name"
android:process=":CropWallpaper" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
<!--End Crop App -->
</application>
</manifest>
as the document says, you can provide android:icon attribute in activity tag for the two launchers. It will override that provided in application tag. And for the name of launcher, just set android:label to different string resource.
Currently you only provide an Icon in application tag and android:label for the two activities are the same resource, so you will see same icon and same label.