I need to set the permission in the manifest to read, I manually edited the manifest after having problems trying to use the android manifest editor. My code is below and is currently proving to be erroneous. Any help appreciated. :)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ac.uk.d"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".Quiz"
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>
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.READ_CONTACTS"/>
</manifest>
The issue is that you have not cleaned the project. To clean the project, select 'Project' on the top menu bar then you'll find clean upon which you clean the selected project or clean all projects as per your needs..
Related
I am using Visual Studio 2015 and have a PCL based project created. All this application does is show a splash screen and then navigate to the next page. I am unable to get this to work on Android. Here is the link for the splash screen
The error I get:
The application could not be started. Ensure that the application has
been installed to the target device and has a launchable activity
(MainLauncher = true).
Additionally, check Build->Configuration Manager to ensure this
project is set to Deploy for this configuration.
I have followed this link and tried all the solutions there and still have the same result
Any tips to fix this?
Edit
Android Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="Splash.Splash" android:installLocation="auto" android:versionCode="1" android:versionName="1.0">
<!--suppress UsesMinSdkAttributes-->
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:icon="#drawable/icon-3" android:name="mono.android.app.Application" android:allowBackup="true" android:label="Splash.Splash" android:debuggable="true">
<activity android:label="Splash screen" android:name="md5ac585b47313c1dc414c7b7a18f93e457.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:icon="#drawable/icon-3" android:noHistory="true" android:theme="#style/Theme.Splash" android:name="md5ac585b47313c1dc414c7b7a18f93e457.Splash">
<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="2147483647" android:authorities="Splash.Splash.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.STM.STM" />
</intent-filter>
</receiver>
</application>
</manifest>
Edit
New Manifest below
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="Super.Super" android:installLocation="auto">
<uses-sdk android:minSdkVersion="15" />
<application android:icon="#drawable/stmicon-3"></application>
</manifest>
EDITED: There was more than one problem in your question. I addressed two of them but the last one was the icon name.
Android resources can't have the '-' character in the name.
so this is the correction:
<application android:icon="#drawable/stmicon3"></application>
Initial answer:
Its wrong to have two activities with the same intent filter for launching.
So, first on your Manifest, remove entirely the two Activities tags.
For helping debugging this. please change your manifest to this (yes we are ignoring the Provider too)
So your final Manifest would be:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.yournamespace.courier">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:label="yournamespace">
</application>
</manifest>
After this, were gonna set the SplashActivity as MainLauncher:
[Activity(MainLauncher = true,
NoHistory = true)]
public class SplashActivity : AppCompatActivity
And finally the MainActivity:
[Activity(Icon = "#drawable/icon")]
public class MainActivity : FormsAppCompatActivity
You Can Do As Jon Sugguested Or Just Go Into Your Android Device Settings & Application Manager And uninstall the previous version of the application on your android device
It was all good yesterday, but right now it won't show up when I run the AVD.
Don't know if it is my AndroidManifest.xml file which is pretty standard.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name="com.example.app.Hoved"
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>
</manifest>
This is now fixed all, thank you!
The problem was that I write Android app on Xamarin, so you use flags there instead of declaring the activity in the manifest.
You missing this 2 'lines', it's really important but just past it above (over) < application and it's will work.
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="21" />
This is the most basic question, you should know that before u start programming in visual studio or eclipse. Just watch some tutorials on youtube it will help you. Good Luck.
I'm trying to develop an android app that needs a user to record his voice.
I was following the Dev guide on http://developer.android.com/guide/topics/media/audio-capture.html
Eclipse gives me this error in my manifest file
The prefix "adroid" for attribute "adroid:name" associated with an element type "uses- permission" is not bound.`
This is my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.rectest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.rectest.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>
</manifest>
Looks like you had a typo error when you first wrote the code.
`The prefix "adroid" for attribute "adroid:name" associated with an element type "uses- permission" is not bound`.`
As it should have been "android" and not "adroid".
The code you attached looks fine, so you should try to Clean and re-build your project.
Go to Project -> Clean -> Select your project. If this keeps, try to restart your eclipse.
I have publish an application on market but is unable to see it on the market website. I hear that is may be due to the /lib in the folder. I got the /lib and have got the admob library in it. I need it. If i delete it, there would be an error. And changing from my current <uses-sdk android:minSdkVersion="3"/> to <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" /> doesn't help either. adding the extra targetSdkVersion just creates an error. Tried a direct url link also didn't work. Any solution for it?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="calc.calc"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".Calculator"
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.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-sdk android:minSdkVersion="3"
/>
If you have a green checkmark and can see a label with the text saying "Published" in the top right corner of your app description in the Android Market Console (like here) then you may just have to wait some time.
In my case, app upgrades are not visible to all of the users instantly.
I have tried everything to get this to work and now I have this error:
Exception in thread "main" java.lang.NoClassDefFoundError: android/app/Activity
There is another post on here that says to try this in the manifesto:
uses-library android:name="com.google.android.maps"
uses-permission android:name="android.permission.INTERNET"
This solution does not work for me.
As background, I am running one windowsXP, I had to change the Bootstrap Entries to JRE System Library and JUnit3 to fix another error. I also had to change the path for the emulator to run as well.
This is my first time trying to run the droid app stuff on here. I am using the hello world example. I assume I must run the emulator for the phone first then run my code?
Thanks
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.rit.cs.ats"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".AndroidTestActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
<uses-permission android:name="android.permission.INTERNET" />
</application>
</manifest>