Hi everyone I'm trying to install an apk that I've designed with minsdk version of 14 and target of 19 onto bluestacks and its failing. What's weird is that I installed an app with the same api version of 14/19 on this very same bluestacks player a month ago(I deleted it now though to swap it with the new apk). Please let me know what api I should be developing in for bluestacks. Here's my xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.demoww"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="14" />
<application
android:allowBackup="true"
android:icon="#drawable/earth"
android:theme="#style/AppTheme" >
<activity
android:name=".LoadScreen"
android:label="#string/Linking_players" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SignUp"
android:label="#string/Signup" >
</activity>
<activity android:name=".MainActivity" >
<meta-data
android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name=".suggestedfriends" >
<meta-data
android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name=".search" >
<meta-data
android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name=".requests" >
<meta-data
android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name=".raul_profile" >
<meta-data
android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name=".raul_message" >
<meta-data
android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name=".profile" >
<meta-data
android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name=".messages" >
<meta-data
android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name=".friendslist" >
<meta-data
android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
</application>
<!-- To access Google+ APIs: -->
<uses-permission android:name="android.permission.INTERNET" />
<!--
To retrieve OAuth 2.0 tokens or invalidate tokens to disconnect a user. This disconnect
option is required to comply with the Google+ Sign-In developer policies
-->
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<!-- To retrieve the account name (email) as part of sign-in: -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
</manifest>
You can check which version of Android your version of BlueStacks is designed for by looking at the table below:
http://forum.xda-developers.com/wiki/BlueStacks_App_Player
The Android version of my BlueStacks is 4.0.4. The API level is 15.
According to the table, the latest version (beta) conforms to 4.4.2 (KitKat).
Unless, you have that version, you have to lower the API level for your apk to 15 or even lower.
If your BlueStacks is installed on a PC, you can check its version by:
Start-> type "regedit"
In registry editor, go to "HKEY_LOCAL_MACHINE" , "SOFTWARE", "BlueStacks" and it should be there under "Version".
[These instructions to find the version number of an installed BlueStacks were originally posted by intheGame.]
If your BlueStacks is installed on a Windows PC, you can check its version by hovering over its taskbar icon.
Related
I am trying to build an application and keep getting this error, I can't seem to do anything about:
Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
The Android manifest is as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ehealth"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="23" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Home"
android:label="#string/app_name" >
<!-- First screen to load start -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- First screen to load end -->
</activity>
<activity
android:name=".Profile"
android:label="#string/title_activity_profile" >
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:windowSoftInputMode="adjustResize|stateHidden" >
</activity>
<meta-data />
<activity
android:name=".Login"
android:label="#string/title_activity_login" >
</activity>
<activity
android:name=".Paramedic"
android:label="#string/title_activity_paramedic" >
</activity>
</application>
<!-- To access Google+ APIs: -->
<uses-permission android:name="android.permission.INTERNET" />
<!--
To retrieve OAuth 2.0 tokens or invalidate tokens to disconnect a user. This disconnect
option is required to comply with the Google+ Sign-In developer policies
-->
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<!-- To retrieve the account name (email) as part of sign-in: -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
</manifest>
Remove the
<meta-data />
meta-data elements must have an android:name and either android:value or android:resource.
For reference (in addition to laalto's answer), if you're using Android Studio, it's worth checking Messages/Gradle Console tabs, as it may contains clues as to what's the problem. In your case, you could have seen something similar to:
Missing 'name' key attribute on element meta-data at AndroidManifest.xml:37:9-22
Yet another question on GoogleMaps Api Key and release mode.
I have my API key, correctly added the SHA-1 in the allowed Android Applications, copied the key in the manifest and the same in both google_maps_api.xml (debug, release) in Android Studio.
In debug everything works fine, but when I install the app through the Signed Apk it shows me gray screen and google logo.
Anyone knows what I can do about that?
Any help would be much appreciated.
This is my AndroidManifest:
<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="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.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.permission.C2D_MESSAGE" />
<application
android:name=".app.AppController"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Welcome"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/FullscreenTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".MenuActivity"
android:label="#string/title_activity_menu"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".GalleryActivity"
android:label="#string/title_activity_gallery"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.MainActivity" />
</activity>
<activity
android:name=".TripActivity"
android:label="#string/title_activity_trip"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".PromoActivity"
android:label="#string/title_activity_promo"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".ContactActivity"
android:label="#string/title_activity_contact"
android:screenOrientation="portrait" >
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
I think you generated SHA fingerprint key from machine A and compiled your android project in machine B. That's one of reason you may get blank screen. Please build your android project in machine A.
I think that you miss google play services. You need to have it in order to use Google Maps API v.2 You can get it from here or here.
Did you implement the map in xml code like this:
<fragment
android:id="#+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
also implement map in java?
GoogleMap googleMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
googleMap.getUiSettings();
googleMap.getUiSettings().setZoomControlsEnabled(true);
There is more info about Google Maps here
Also if you have any question just ask
Update:
This part of the code:
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
needs to implemented right after the activity of the class where the map is located/
For example if the map is located in Welcome class the the manifest should look like this:
<permission
android:name="com.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.permission.C2D_MESSAGE" />
<application
android:name=".app.AppController"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Welcome"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/FullscreenTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".MenuActivity"
android:label="#string/title_activity_menu"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".GalleryActivity"
android:label="#string/title_activity_gallery"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.MainActivity" />
</activity>
<activity
android:name=".TripActivity"
android:label="#string/title_activity_trip"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".PromoActivity"
android:label="#string/title_activity_promo"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".ContactActivity"
android:label="#string/title_activity_contact"
android:screenOrientation="portrait" >
</activity>
Update
Check if you have updated google play services in android sdk and also check in gradle if you have added this line in dependencies :
compile 'com.google.android.gms:play-services:7.0.0'
I have just same issue and i know why.
Check the logcat if you find:
Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)
Google Maps Android API: Ensure that the "Google Maps Android API v2" is enabled.
Google Maps Android API: Ensure that the following Android Key exists:
Google Maps Android API: API Key: YOUR_KEY_HERE
Google Maps Android API: Android Application (<cert_fingerprint>;<package_name>): xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx;com.example
Check file google_maps_api.xml in folder
app\src\debug\res\valuess
and
app\src\release\res\values
For debug is another file with API that in release.
My application in Android Studio has separate components for mobile devices and for Google Glasses. When I attempt to load the mobile version onto a Nexus 10 (Android version 4.4.2) I get the following error:
Applications have the same package name com.example.carterpedersen.datatransfer:
mobile, glass
I can, however, load the app onto a glass device (XE19.1) with no problem.
I find this error perplexing because my app has been running with no problem for several weeks, and all of a sudden the mobile component is crippled. I did recently add a dependency on the glass R to the mobile component, but even this was a few days before this error showed itself.
I tried refactoring the mobile directory, as well as the whole package, with no success.
I have searched SO and other sources but I didn't find any duplicates; please link me if I am wrong on this point. Thanks for the help. Provided manifests are below.
Mobile manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.datatransfer" >
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.carterpedersen.datatransfer.FileRetrieval"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.carterpedersen.datatransfer.BluetoothClient"
android:label="#string/title_activity_bluetooth_client" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Glass Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.datatransfer" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.carterpedersen.datatransfer.LauncherActivity"
android:label="#string/title_activity_launcher" >
</activity>
<activity
android:name="com.example.carterpedersen.datatransfer.LiveCardMenuActivity"
android:theme="#style/MenuTheme" >
</activity>
<!-- Service responsible for maintaining LiveCard -->
<service
android:name="com.example.carterpedersen.datatransfer.LiveCardDataCollect"
android:icon="#drawable/ic_glass_logo"
android:label="#string/title_activity_live_card_data_collect" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger" />
</service>
<!-- For content sharing permissions -->
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.example.carterpedersen.datatransfer.fileprovider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
<!-- Selects file for sharing to client. -->
<activity
android:name="com.example.carterpedersen.datatransfer.FileShareActivity"
android:label="#string/title_activity_file_share" >
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
<activity
android:name="com.example.carterpedersen.datatransfer.BluetoothHost"
android:label="#string/title_activity_bluetooth_host" >
</activity>
<receiver android:name="com.example.carterpedersen.datatransfer.BluetoothHost$HostBroadRec" >
<intent-filter>
<action android:name="transapps.g6.new.alert" />
</intent-filter>
</receiver>
</application>
Try using just one manifest (combined for use on both mobile and Glass - I'm assuming one apk correct?)
Just close completely the android studio and reopen it. My problem solved after this.
By the way you can try this command on cmd:
adb uninstall com.your.package
Try changing the package name in each of the AndroidManifest.xml files. So, for example, change to:
Mobile
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.mobile.datatransfer" >
Glass
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.glass.datatransfer" >
The package name should be unique amongst applications. Refer to the package attribute definition.
I've developed my first Android app, and have successfully deployed it to my Galaxy S4. The app was developed for API level 19.
When I tried to install it on an older phone (HTC Desire, running Android 2.3) I got an error saying that the apk could not be parsed. I guessed that this was because the API level for the app was 19, so revised this in my Android manifest to API level 9, regenerated the APK, then tried installing it on the HTC again. This time it tried to install the app, advised me of the permissions being requested, but then gave the error message "Application not installed"
Can anyone suggest what my options are from here? My Android manifest is below.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ian.mealtimer"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="9" />
<application
android:name="com.ian.mealtimer.MealTimerApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.ian.mealtimer.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.ian.mealtimer.PresetItemsActivity"
android:label="#string/preset_item" >
</activity>
<activity
android:name="com.ian.mealtimer.MealActivity"
android:label="#string/title_activity_meal" >
<!-- android:parentActivityName="com.ian.mealtimer.MainActivity" > -->
<!-- <meta-data -->
<!-- android:name="android.support.PARENT_ACTIVITY" -->
<!-- android:value="com.ian.mealtimer.MainActivity" /> -->
</activity>
<activity
android:name="com.ian.mealtimer.MealItemActivity"
android:label="#string/title_activity_meal_item" >
android:parentActivityName="com.ian.mealtimer.MealActivity" >
<!-- <meta-data -->
<!-- android:name="android.support.PARENT_ACTIVITY" -->
<!-- android:value="com.ian.mealtimer.MealActivity" /> -->
</activity>
<activity
android:name="com.ian.mealtimer.MealItemDetailActivity"
android:label="#string/title_activity_meal_item_detail"
android:parentActivityName="com.ian.mealtimer.MealItemActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.ian.mealtimer.MealItemActivity" />
</activity>
<activity
android:name="com.ian.mealtimer.SelectPresetItemActivity"
android:label="#string/title_activity_select_preset_item" >
</activity>
<activity
android:name="com.ian.mealtimer.SavedMealsActivity"
android:label="#string/title_activity_saved_meals" >
</activity>
<activity
android:name="com.ian.mealtimer.SetMealTimersActivity"
android:label="#string/title_activity_set_meal_timers"
android:parentActivityName="com.ian.mealtimer.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.ian.mealtimer.MainActivity" />
</activity>
<receiver android:name=".AlarmReceiver" >
</receiver>
</application>
<permission
android:name="android.permission.STATUS_BAR_SERVICE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" >
</uses-permission>
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" >
</uses-permission>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" >
</uses-permission>
</manifest>
The Application not installed occurs when there is a conflict with the old installed app with the new installed app. First of all you installed it first with the api as 19 then installed it again with api as 9 with out uninstalling it first.
solution:
Uninstalled the app first then use the android:minSdkVersion="9" in the manifest
`
I'm developing an Android game with Unity. I used this plugin for Admob. The Interstitial ad is clickable but when i click the banner nothing's happen. I tried this but nothing's changed. Additionally, i tried add com.unity3d.player.UnityPlayerNativeActivity Activity in manifest file and i got this error:
Trying to merge incompatible
/manifest/application/activity[#name=com.unity3d.player.UnityPlayerNativeActivity]
element:
How can i solve this problem? Any suggestions will make me happy. Thanks.
Here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<!-- This file was automatically generated by the Google Play Games plugin for Unity
Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
<application>
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\ 123456789123" />
<meta-data android:name="com.google.android.gms.appstate.APP_ID"
android:value="\ 123456789123" />
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity android:name="com.google.example.games.pluginsupport.SignInHelperActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.google.example.games.pluginsupport.SelectOpponentsHelperActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.google.example.games.pluginsupport.InvitationInboxHelperActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<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" android:screenOrientation="landscape">
<intent-filter>
<action android:name ="android.intent.action.MAIN" />
<category android:name ="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name ="unityplayer.ForwardNativeEventsToDalvik" android:value ="true" />
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
Check your minimum sdk version in unity. You have declared it 8 and in google play services by default min sdk is 9. Try changing your sdk to 9 in the unity and hope it will work.