I have been trying to convert my activities into fragments, and during the process somewhere I messed something up in one of my files. I am getting the error where it can't find my R.java file, and I checked all of my libraries but there are no errors in their xml files. Nor are there errors in my apps xml files. Well, there might be, but they aren't showing up.
I have cleaned my projects multiple times, and I have restarted Eclipse, but nothing seems to work. No errors are coming up in my xml files, so do you all have any ideas for fixing this?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fotolife.app"
android:versionCode="1"
android:versionName="1" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-feature android:name="android.hardware.camera" />
<application
android:icon="#drawable/icon_retina"
android:label="The Foto Life"
android:screenOrientation="portrait" >
<uses-library
android:name="com.google.android.maps"
android:required="true" />
<activity
android:name=".Splash"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Login"
android:excludeFromRecents="true"
android:exported="false"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="com.fotolife.app.LOGIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".MainView"
android:exported="false"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="com.fotolife.app.MAINVIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Menu"
android:exported="false"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="com.fotolife.app.MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Upload"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="com.fotolife.app.UPLOAD" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Map"
android:exported="false"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="com.fotolife.app.MAPS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".AndroidCustomGalleryActivity"
android:configChanges="keyboardHidden|orientation"
android:exported="false"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="com.fotolife.app.GALLERY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".EditGallery"
android:configChanges="keyboardHidden|orientation"
android:exported="false"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="com.fotolife.app.GALLERY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".UploadQueue"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name="com.aviary.android.feather.FeatherActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:hardwareAccelerated="true"
android:largeHeap="true"
android:screenOrientation="portrait"
android:theme="#style/FeatherDefaultTheme.Custom" />
<receiver
android:name="com.aviary.android.feather.receivers.FeatherSystemReceiver"
android:exported="true"
android:process=":feather_system_receiver" >
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<provider
android:name="com.aviary.android.feather.library.providers.FeatherContentProvider"
android:authorities="com.fotolife.app.upload"
android:exported="false" >
</provider>
<meta-data
android:name="ADMOB_PUBLISHER_ID"
android:value="a150e7b057ac915" />
</application>
</manifest>
I have a tag in my manifest that I move around and don't get errors. Can you tell me the correct location for it?
Update the Build Tools in Android SDK Manager
Delete your 'gen' and 'bin' folder, then check the 'Problem' Tab (in eclipse). I bet you are missing an XML reference, or have another error in an XML file (sometimes not escaping slashes or quotes can do it).
Finally, check your project properties to make sure you are still targeting the appropriate SDK Version, and that your libraries are all still linked.
I found out the problem. There was an 8 hiding in my edit.xml file..... I got rid of it and the problem was fixed.
Related
Error:
Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined.
manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.will_dev.vpn_app">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="com.android.vending.BILLING" />
<application
android:name="com.will_dev.vpn_app.YouApplication"
android:hardwareAccelerated="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:roundIcon="#drawable/logo"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="com.will_dev.vpn_app.view.MainActivity"
/>
<activity
android:name="com.will_dev.vpn_app.view.IntroActivity"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Login"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.TDView"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.EnterReferenceCode"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.RewardPointClaim"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Verification"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Spinner"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.AboutUs"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.ContactUs"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.PrivacyPolice"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Faq"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.EarnPoint"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.ForgetPassword"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.Register"
/>
<activity
android:name="com.will_dev.vpn_app.fromanother.activity.SplashScreen"
/>
<activity
android:name="com.will_dev.vpn_app.view.Servers"
/>
<activity
android:exported="true"
android:name="com.will_dev.vpn_app.fromanother.activity.WelcomeActivity"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="de.blinkt.openvpn.DisconnectVPNActivity"
android:excludeFromRecents="true"
android:noHistory="true"
android:taskAffinity=".DisconnectVPN"
android:theme="#style/blinkt.dialog" />
<service
android:name="de.blinkt.openvpn.core.OpenVPNService"
android:exported="true"
android:permission="android.permission.BIND_VPN_SERVICE">
<intent-filter>
<action android:name="android.net.VpnService" />
</intent-filter>
</service>
<activity
android:name="com.will_dev.vpn_app.view.PurchaseActivity"
/>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/admob_app_id" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:exported="true"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
</application>
i have added exported=true to launcher activity but still it failing
Try add android: exported to all of your activities if you are targeting android 12. Even if you don't want to export it add android: export = "false".
This issue can be with external libraries. Just wait when libraries will be updated or delete these libraries from project. Or you can try search in project and find which library uses intent. And use manifest merge attribute to add exported to external library.
https://android-doc.github.io/tools/building/manifest-merge.html
i am getting this error while developing my app, every thing works fine suddenly this error happened while run the app and checking the changes, as i told everything works fine suddenly this happen i didn't change anything in Manifest.xml file., this is the manifest file kindly help me out.
this is the error i am getting
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.habitreminder">
<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.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<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=".OnboardingPackage.OnboardingSlider"
android:theme="#style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".userhome.UserDashboardActivity"
android:theme="#style/Theme.AppCompat.NoActionBar"
android:label="#string/title_activity_user_dashboard">
</activity>
<activity
android:name=".signup.UserCalenderSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".signup.UserMapSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".signup.UserDetailsSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".login.LoginActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".LoginSignup.LoginSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".MainActivity"
android:theme="#style/Theme.AppCompat.NoActionBar">
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCy-z3OoXACHh_MKBLoCPjdNo2ySD1ogU8" />
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity android:name=".ProfileSettings.changeprofilename"
android:theme="#style/AppThemepopup"/>
</application>
</manifest>
Is your activity declared in ŮŽAndroidManifest like this ?
<activity
android:name=".launchactivity"
android:label="#string/title_activity_login"
android:windowSoftInputMode="stateHidden" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
enter image description here
I just close the Android Studio And delete 2 folders name caches and tmp and start the Android Studio again and it worked.
I am submitting a new version of my app. But the developer console doesn't allow me to do so. It says that my app is not compliant with the new policies for the permission (ask for permission at runtime).
But as I can see, I don't use any dangerous permission...
My app is using the following permissions (according to the developer console) :
android.permission.ACCESS_NETWORK_STATE, android.permission.ACCESS_WIFI_STATE, android.permission.INTERNET, android.permission.WAKE_LOCK
<?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="fr.mehfile">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" tools:node="remove"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" tools:node="remove"/>
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:name=".ApplicationMz">
<activity
android:name=".view.SplashScreen"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".view.Accueil"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.Programs"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
</activity>
<activity
android:name=".view.Infos"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.NousContacter"
android:configChanges="keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.ProgramDetail"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.NewsList"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.News"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.TimeTable"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".view.TimeTableTab"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service android:name="fr.mehfile.MyFirebaseMessagingService"
android:permission="">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
Thanks in advance for your help.
To find where permissions might be originating, you can look at the merged manifest file using Android Studio. Open your manifest file in Android Studio and the click the "Merged" tab at the bottom of the editor. Here is a picture for context:
I am receiving a file through mail "*.pzl". this files has some data that is required from my application.
now I want to do that when I clicked on that mail that has ".pzl" file. I want to open my app and do some work.
I have tried so may method but I can't find the solution.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.agicent.fifteen_puzzle"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.games.APP_ID"
android:value="#string/app_id" />
<meta-data
android:name="com.google.android.gms.appstate.APP_ID"
android:value="#string/app_id" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".activities.SplashScreen"
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=".activities.MenuActivity"
android:label="#string/title_activity_menu"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activities.MyActivity"
android:label="#string/title_activity_game"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.pzl" />
</intent-filter>
</activity>
<activity
android:name=".activities.SettingsActivity"
android:label="#string/title_activity_settings"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activities.AchevementsActivity"
android:label="#string/title_activity_achevements" >
</activity>
</application>
</manifest>
possible solutions:
Remove mimtype or
add data android:host="*" in intent filter
have called intent in the activity which handle pzl file type?
This is my android Manifest.xml.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="uk.co.halfninja.wallpaper.parallax">
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
<application
android:label="#string/app_name"
android:icon="#drawable/icon">
<service
android:label="#string/app_name"
android:name=".ParallaxWallpaper"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.service.wallpaper" android:resource="#xml/wallpaper" />
</service>
<activity
android:label="#string/wallpaper_settings"
android:name=".ParallaxWallpaperSettings"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:exported="true">
</activity>
</application>
</manifest>
Still Eclipse showing the result
ParallaxWallpaper] No Launcher activity found!
ParallaxWallpaper] The launch will only sync the application package on the device!
ParallaxWallpaper] Performing sync
ParallaxWallpaper] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
Please let me Know where am i doing the mistake, and what would be the solution...???
Move the intent-filter tag from service to activity
These lines should be in Activity tag
<application
android:label="#string/app_name"
android:icon="#drawable/icon">
<activity
android:label="#string/wallpaper_settings"
android:name=".ParallaxWallpaperSettings"
android:theme="#android:style/Theme.Black.NoTitleBar" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:label="#string/app_name"
android:name=".ParallaxWallpaper"
android:permission="android.permission.BIND_WALLPAPER">
</service>
<meta-data android:name="android.service.wallpaper" android:resource="#xml/wallpaper" />
</application>
make activity as launcher you have made service as launcher. like that
<activity
android:label="#string/wallpaper_settings"
android:name=".ParallaxWallpaperSettings"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>