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.
Related
I have made an Android app using AndroidStudio and want to test it on different phones. I have generated the signed apk (release version) and I could successfully install the apk on my device (Nexus 5).
Then I tried to install the same apk on a Nexus 4 but it throws an error after the installation that the package installer has stopped.
Here is what my manifest file looks like
<?xml version="1.0" encoding="utf-8"?>
<application
android:permission="android.permission.WRITE_EXTERNAL_STORAGE"
android:allowBackup="true"
android:icon="#drawable/endecrypt_ico"
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=".PostSubmission"
android:label="#string/title_activity_post_submission"
android:parentActivityName=".MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.psimit.encrypt.MainActivity" />
</activity>
</application>
I am not able to understand where the problem lies. Since the app works when installed via the debugger and also using the apk on my phone, I am tempted to think if I need to do something more for compatibility across Nexus 4 and Nexus 5 during the generation of the signed apk.
I would quite appreciate some pointers if someone has encountered this problem earlier. Thanks in advance.
It's a really strange issue you have. Maybe you're doing things wrong.
The permissions should be at the root of the manifest tag :
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.app">
<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" />
<application>
<activity
...
</activity>
</application>
</manifest>
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"
I have developed a simple application using SDK(Android: 3.2[API-13]) for, to display Google banners.
I have tow problems in this application.
Problem No.1:
I have checked the application it runs on emulator but how can i check it that it working correctly or not?
Problem No.2:
I want to run the application on my physical Android device using Android version 2.3.3. What changes I need to do in the application to run it on my Android device using Android version 2.3.3.?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.farman.banner"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".MyBannerActivity"
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|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest
>
Ans 1 :-You have to install it in the Device and Check it.
Ans 2 :-To Run it in the 2.3.3 version,you have edit the files as below:-
project.properties OR default.properties(Only 1 of the 2 may
be present in the root folder)
Here...Change the value of target=android-10
Androidmanifest.xml
Here...Check and Change the value of
<uses-sdk android:minSdkVersion="13" /> as <uses-sdk android:minSdkVersion="10" />
Now clean and run your application and it will run in 2.3 version.
I've written app for Android 2.2 (target version) and I tried to run it on device with Android 4.0.3 but it fails with granting permission for internet connection. It run without problems on Android 2.3. Is there any way to run that app on A4.0 without changing target SDK version?
My AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pl.niemier.allegro"
android:versionCode="1"
android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" android:debuggable="true">
<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=".ShowAuctionActivity"></activity>
<activity android:name=".SearchFormActivity"></activity>
<activity android:name=".UserInfoActivity"></activity>
<activity android:name=".ConfigPanelActivity"></activity>
</application>
</manifest>
Try adding the SDK target version in you manifest file:
<uses-sdk android:minSdkVersion="8" />
Please check if the version number is correct.
I assume you have added <uses-permission android:name="android.permission.INTERNET" /> since it works on Android 2.3.
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>