App works fine when tested from Eclipse on phone via USB/Sync, when I try and Export it to an .apk, the Manifest.xml looses track of 2 activities under the parent "MasterActvity". Then even the USB/Sync stops working because it can't locate the activities. No memory storage is used, just text displays.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.theoreferenceguide"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.theoreferenceguide.MasterActivity"
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="TipActivity"></activity> This keeps getting kicked out during .apk
<activity android:name="UccActivity"></activity> This keeps getting kicked out during .apk
</application>
</manifest>
I agree with nicopico. It looks like you are missing the . infront of the activity which tells the manifest that the activity is in the local namespace. Alternatively if TipActivity is in the same namespace as MasterActivity you can also do android:name="com.example.theoreferenceguide.TipActivity"
Related
I've developed an app but when I run it, it crashes and shows the error: android unable to instantiate activity componentinfo classnotfoundexception.
I've read a lot about this error. I've tried Project -> Properties -> Java Build Path -> Order & Export and ensure Android Private Libraries and all other library projects are checked.
I've also noticed that when I press ctrl and pass the mouse over, for example, .MainActivity in my Android Manifest file, it doesn't display or link me to the Activity, don't know why.
Any ideas about this problem? Thank you so much.
EDIT: Manifest added
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.isa.mememe"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="16" />
<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"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</manifest>
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've edited and added features from a programme which has involved adding another class (not activity class) since then when I load the app onto my android device I cannot see an icon appear but the app appears in the Application Manager. I have no errors showing and have commented out each section of the new class to turn it back to the original app. Could anyone tell me whether the problem is most likely to be in the manifest, the main.xml or the activity class? Or if they have come across a similar problem?
Cannot publish code due to company policy.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myAppName" <!-- real package name cannot be supplied -->
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="18" />
<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.MAINACTIVITY" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="com.example.MyAppName.ProviderClassName"
android:authorities="com.example.MyAppName.ProviderClassName"
/>
</application>
</manifest>
This used to work fine before in my setting, and now its giving this error even for a test application
the default manifest file is shown below;
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.test.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>
the image of the monkey output
the project name and directory matches if i am not wrong as shown here
I have no clue what i am doing wrong here.. help please...
-p <allowed-package-name> in your case -p com.example.test
I have installed eclipse in a new clean PC and now strangely it works.. so something in this installation is creating this error.. so now, to find out why...
I am getting this error when trying to install my exported unsigned application on tablet pc (running Android 4.04. version). App is normally installing and running in Android emulator in Eclipse. I tried removing and reinstalling it, but that didn't help either. Atached is my AndroidManifest.xml since problem is often there (but I can't see any duplicate code).
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="hr.punctum.LociranjePonudaProizvoda"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="16" />
<application
android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:theme="#style/AppTheme">
<activity
android:label="#string/app_name"
android:name=".ListaProizvoda" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="DetaljiProizvoda"></activity>
<activity android:name="GMapsActivity"></activity>
<uses-library android:name="com.google.android.maps" />
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
The only thing suspicious I see is the uses-library tag, do you have the Google Maps lib in your tablet? (if yes then you should have the following files in it)
/system/etc/permissions/com.google.android.maps.xml
/system/framework/com.google.android.maps.jar
Without the lib the apk installation will fail with INSTALL_FAILED_MISSING_SHARED_LIBRARY error.