Android google map not showing up on emulator - android

I am trying to implement this example http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html and i have followed exactly all the steps but in the emulator the map doesnt show up it just displays boxes.Does any one have any idea what wrong am i doing.Logcat is below
This is my manifest file,
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="gmap.com"
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=".GmapActivity"
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" />
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:enabled="true"
android:apiKey="0YjDTTmg77HeTG-dfdfdfdfdWovpPSnatfUTrp5MQ"
/>
</LinearLayout>
Logcat
07-20 12:55:21.688: DEBUG/AndroidRuntime(389): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
07-20 12:55:21.688: DEBUG/AndroidRuntime(389): CheckJNI is ON
07-20 12:55:22.086: DEBUG/AndroidRuntime(389): --- registering native functions ---
07-20 12:55:23.576: DEBUG/AndroidRuntime(389): Shutting down VM
07-20 12:55:23.597: DEBUG/dalvikvm(389): Debugger has detached; object registry had 1 entries
07-20 12:55:24.396: DEBUG/AndroidRuntime(397): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
07-20 12:55:24.396: DEBUG/AndroidRuntime(397): CheckJNI is ON
07-20 12:55:24.686: DEBUG/AndroidRuntime(397): --- registering native functions ---
07-20 12:55:26.046: INFO/ActivityManager(59): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=gmap.com/.GmapActivity }
07-20 12:55:26.156: DEBUG/AndroidRuntime(397): Shutting down VM
07-20 12:55:26.168: DEBUG/dalvikvm(397): Debugger has detached; object registry had 1 entries
07-20 12:55:26.215: INFO/AndroidRuntime(397): NOTE: attach of thread 'Binder Thread #3' failed
07-20 12:55:26.826: WARN/MapActivity(337): Recycling dispatcher com.google.googlenav.datarequest.DataRequestDispatcher#44ef1a08
07-20 12:55:26.856: VERBOSE/MapActivity(337): Recycling map object.
07-20 12:55:27.146: INFO/MapActivity(337): Handling network change notification:CONNECTED
07-20 12:55:27.186: ERROR/MapActivity(337): Couldn't get connection factory client
07-20 12:55:27.416: INFO/ActivityManager(59): Displayed activity gmap.com/.GmapActivity: 964 ms (total 964 ms)
07-20 12:55:27.965: WARN/InputManagerService(59): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#44ee5428 (uid=10034 pid=353)
07-20 12:55:33.666: DEBUG/dalvikvm(353): GC_EXPLICIT freed 9539 objects / 509864 bytes in 180ms

Well this is a small issue of signed key, Actually you have taken map key with your own keystore but currently your application is signed with default android debug.keystore . sign your application with the keystore with which you have generated map key and then install on emulator and run it

Related

Android INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION while installing apk on emulator

I created a debug apk (on Windows) from command line using
gradlew assembleDebug
When I try to install it on a emulator using
adb install app/build/outputs/apk/debug/app-debug.apk
I get following message:
1057 KB/s (419548 bytes in 0.387s)
pkg: /data/local/tmp/app-debug.apk
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]
I ran adb logcat in a separate terminal window and it shows below trace:
D/AndroidRuntime( 203): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 203): CheckJNI is ON
D/AndroidRuntime( 203): --- registering native functions ---
D/ddm-heap( 203): Got feature list request
D/PackageParser( 52): Scanning package: /data/app/vmdl65951.tmp
W/ResourceType( 52): Bad string block: string #1 extends to 2847, past end at 68
W/PackageParser( 52): /data/app/vmdl65951.tmp
W/PackageParser( 52): java.lang.IndexOutOfBoundsException
W/PackageParser( 52): at android.content.res.StringBlock.nativeGetString(Native Method)
W/PackageParser( 52): at android.content.res.StringBlock.get(StringBlock.java:81)
W/PackageParser( 52): at android.content.res.AssetManager.getPooledString(AssetManager.java:258)
W/PackageParser( 52): at android.content.res.TypedArray.loadStringValueAt(TypedArray.java:675)
W/PackageParser( 52): at android.content.res.TypedArray.getValueAt(TypedArray.java:659)
W/PackageParser( 52): at android.content.res.TypedArray.peekValue(TypedArray.java:620)
W/PackageParser( 52): at android.content.pm.PackageParser.parseApplication(PackageParser.java:1351)
W/PackageParser( 52): at android.content.pm.PackageParser.parsePackage(PackageParser.java:734)
W/PackageParser( 52): at android.content.pm.PackageParser.parsePackage(PackageParser.java:390)
W/PackageParser( 52): at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:4275)
W/PackageParser( 52): at com.android.server.PackageManagerService.access$1600(PackageManagerService.java:109)
W/PackageParser( 52): at com.android.server.PackageManagerService$5.run(PackageManagerService.java:3779)
W/PackageParser( 52): at android.os.Handler.handleCallback(Handler.java:587)
W/PackageParser( 52): at android.os.Handler.dispatchMessage(Handler.java:92)
W/PackageParser( 52): at android.os.Looper.loop(Looper.java:123)
W/PackageParser( 52): at android.os.HandlerThread.run(HandlerThread.java:60)
D/AndroidRuntime( 203): Shutting down VM
D/dalvikvm( 203): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 203): DestroyJavaVM shutting VM down
How can I fix this?
My build.gradle looks like below:
apply plugin: 'com.android.application'
android {
compileSdkVersion 7
buildToolsVersion "27.0.0"
defaultConfig {
applicationId "myApp"
minSdkVersion 7
targetSdkVersion 7
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
applicationIdSuffix ".debug"
debuggable true
}
}
}
and my AndroidManifest.xml is like below:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="myApp"
android:versionCode="5"
android:versionName="2" >
<uses-sdk android:minSdkVersion="7" />
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".Main"
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=".DisplayForm"
class=".Aarti" >
</activity>
</application>
</manifest>
I think you should use compileSdkVersion and targetSdkVersion 27 with buildToolsVersion 27 in build.gradle

Android application not showing

I am developing an Android application and I am testing it on the emulator.
Recently, I got a strange behavior, I launch my application, it seems it has started but the activty isn't showing up.
I start my application with the activity MainActivity, which is in com.mypackage.myapp package.
In my logcat I have the following messages
08-24 17:31:30.578: I/ActivityManager(1116): 2353 START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.mypackage/.myapp.activities.MainActivity} from pid 1546
08-24 17:31:30.638: D/PermissionCache(915): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (70 us)
08-24 17:31:30.638: I/dalvikvm(916): Starting: com.mypackage with UID: 10018
08-24 17:31:30.638: I/AppDB(916): App database successfully initialized
08-24 17:31:30.638: D/AndroidRuntime(1546): Shutting down VM
08-24 17:31:30.638: D/dalvikvm(1546): GC_CONCURRENT freed 100K, 77% free 481K/2048K, paused 0ms+0ms
08-24 17:31:30.638: W/WindowManager(1116): Failure taking screenshot for (306x489) to layer 21005
08-24 17:31:30.648: D/jdwp(1546): Got wake-up signal, bailing out of select
08-24 17:31:30.648: D/dalvikvm(1546): Debugger has detached; object registry had 1 entries
08-24 17:31:30.658: D/dalvikvm(916): Executing: "/system/bin/ndc fw connect 10018 com.mypackage"
08-24 17:31:30.658: I/AndroidRuntime(1546): NOTE: attach of thread 'Binder Thread #3' failed
08-24 17:31:30.658: D/NetD(1556): NETD command: fw connect 10018 com.mypackage
08-24 17:31:30.658: I/FWController(912): App(com.mypackage): already connected
08-24 17:31:30.658: D/dalvikvm(1557): Not late-enabling CheckJNI (already on)
08-24 17:31:30.658: I/ActivityManager(1116): Start proc com.mypackage for activity com.mypackage/.myapp.activities.MainActivity: pid=1557 uid=10018 gids={3003}
08-24 17:31:30.668: D/dalvikvm(1116): GREF has increased to 401
08-24 17:31:31.508: I/MainActivity(1557): Prepayment
08-24 17:31:31.508: W/WindowManager(1116): Failure taking screenshot for (306x489) to layer 21010
I can't seem to find where the problem comes from.
The weird thing is that the application continue to run and I can see the log messages I've set up when the app runs normally.
Here is my manifest file :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypackage"
android:versionCode="19"
android:versionName="2.2.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="#drawable/image"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" >
<activity
android:name=".myapp.activities.AwardActivity"
android:label="#string/title_activity_discount" >
</activity>
<activity
android:name=".myapp.activities.EnrollmentActivity"
android:label="#string/title_activity_enrollment" >
</activity>
<activity
android:name=".myapp.activities.ErrorActivity"
android:label="#string/title_activity_error" >
</activity>
<activity
android:name=".myapp.activities.LocalDialogActivity"
android:label="#string/title_activity_local_dialog" >
</activity>
<activity
android:name=".myapp.activities.LoyaltyActivity"
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>
</application>
</manifest>
Any ideas would be welcome.

Google Maps yields a black map

My google maps in android yields a black map. Is it because I have my files set up incorrectly (libraries in the wrong place etc.?)
Images:
The black screen:
The libraries and whatnot:
Are all my imported libraries correct?
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.sonnet"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.example.barcodelibrary.permission.MAPS_RECEIVE"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<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.sonnet.FullscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name"
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="com.example.sonnet.Map"
android:label="#string/title_activity_map" >
</activity>
<activity
android:name="com.example.sonnet.MapActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_map"
android:theme="#style/FullscreenTheme" >
</activity>
<uses-library android:name="com.google.android.maps"/>
<meta-data
android:name="com.google.android.maps.v2.stuff"
android:value="stuff" />
</application>
</manifest>
there 'stuff' means my API key.
And my Logcat:
02-06 16:14:44.735: D/AndroidRuntime(5651): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-06 16:14:44.735: D/AndroidRuntime(5651): CheckJNI is OFF
02-06 16:14:44.745: D/dalvikvm(5651): Trying to load lib libjavacore.so 0x0
02-06 16:14:44.745: D/dalvikvm(5651): Added shared lib libjavacore.so 0x0
02-06 16:14:44.755: D/dalvikvm(5651): Trying to load lib libnativehelper.so 0x0
02-06 16:14:44.755: D/dalvikvm(5651): Added shared lib libnativehelper.so 0x0
02-06 16:14:44.895: D/AndroidRuntime(5651): Calling main entry com.android.commands.pm.Pm
02-06 16:14:44.895: D/AndroidRuntime(5651): Shutting down VM
02-06 16:14:44.895: D/dalvikvm(5651): Debugger has detached; object registry had 1 entries
02-06 16:14:44.895: I/AndroidRuntime(5651): NOTE: attach of thread 'Binder_1' failed
02-06 16:14:45.365: D/AndroidRuntime(5661): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-06 16:14:45.365: D/AndroidRuntime(5661): CheckJNI is OFF
02-06 16:14:45.375: D/dalvikvm(5661): Trying to load lib libjavacore.so 0x0
02-06 16:14:45.375: D/dalvikvm(5661): Added shared lib libjavacore.so 0x0
02-06 16:14:45.385: D/dalvikvm(5661): Trying to load lib libnativehelper.so 0x0
02-06 16:14:45.385: D/dalvikvm(5661): Added shared lib libnativehelper.so 0x0
02-06 16:14:45.515: D/AndroidRuntime(5661): Calling main entry com.android.commands.am.Am
02-06 16:14:45.525: D/dalvikvm(5661): Note: class Landroid/app/ActivityManagerNative; has 163 unimplemented (abstract) methods
02-06 16:14:45.525: I/ActivityManager(432): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.sonnet/.FullscreenActivity} from pid 5661
02-06 16:14:45.565: D/AndroidRuntime(5661): Shutting down VM
02-06 16:14:45.565: D/jdwp(5661): Got wake-up signal, bailing out of select
02-06 16:14:45.565: D/dalvikvm(5661): Debugger has detached; object registry had 1 entries
02-06 16:14:45.565: D/dalvikvm(5672): Late-enabling CheckJNI
02-06 16:14:45.575: I/ActivityManager(432): Start proc com.example.sonnet for activity com.example.sonnet/.FullscreenActivity: pid=5672 uid=10031 gids={50031, 3003, 1015, 1028}
02-06 16:14:45.595: D/dalvikvm(122): GC_EXPLICIT freed 40K, 2% free 7478K/7584K, paused 1ms+2ms, total 29ms
02-06 16:14:45.625: D/dalvikvm(122): GC_EXPLICIT freed <1K, 2% free 7478K/7584K, paused 1ms+2ms, total 27ms
02-06 16:14:45.655: D/dalvikvm(122): GC_EXPLICIT freed <1K, 2% free 7478K/7584K, paused 1ms+2ms, total 28ms
02-06 16:14:45.995: D/libEGL(5672): loaded /system/lib/egl/libEGL_tegra.so
02-06 16:14:46.035: D/libEGL(5672): loaded /system/lib/egl/libGLESv1_CM_tegra.so
02-06 16:14:46.055: D/libEGL(5672): loaded /system/lib/egl/libGLESv2_tegra.so
02-06 16:14:46.095: D/OpenGLRenderer(5672): Enabling debug mode 0
02-06 16:14:46.125: I/ActivityManager(432): Displayed com.example.sonnet/.FullscreenActivity: +566ms
02-06 16:14:46.395: D/TilesManager(5672): Starting TG #0, 0x641e71c8
02-06 16:14:46.395: D/TilesManager(5672): new EGLContext from framework: 62607d38
02-06 16:14:46.395: D/GLWebViewState(5672): Reinit shader
02-06 16:14:46.405: D/GLWebViewState(5672): Reinit transferQueue
02-06 16:14:48.705: W/ProcessStats(432): Skipping unknown process pid 5698
02-06 16:14:48.705: W/ProcessStats(432): Skipping unknown process pid 5709
02-06 16:14:48.705: W/ProcessStats(432): Skipping unknown process pid 5710
Looking at your manifest file, I see at least one problem:
1 - set the Google Play Services library for the application tag
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
Then please make sure you have enabled the Google Maps API in the Google API console and that you are using the correct API Key according to the certificate you're using to sign the app.
All the procedure is described here: https://developers.google.com/maps/documentation/android/start

Blank map with zoom controls on using Google Map's API V2 Fragment Map:

I am tring to implement google maps using the new google maps api v2 and for some reason i don't see a map.
I think that the problem is those two lines of error when i run it on the emulator:
E/ActivityThread( 1373): Failed to find provider info for com.google.settings
E/ActivityThread( 1373): Failed to find provider info for com.google.android.gsf
.gservices
when i run the application on the device the following error is produced:
Could not find class 'maps.j.k', referenced from method map.y.ae.a
My problem looks the same as in this link: http://android-er.blogspot.co.il/2012/12/google-maps-android-api-v2-with-blank.html
There it's says that the problem may be my key so i went and reproduced it using the following tutorial: http://android-er.blogspot.co.il/2012/12/displaying-sha1-certificate-fingerprint.html. but this still didn't helped me.
the support files are of course add to the project as well as the Google play services lib.
I see the same result on the emulator (after adding manually the two file that allow using the google map v2 on the emulator) as well as on the motorola Defy running android 2.2.
Maybe I am using the wrong debug.keystore? I am using the one in my User.android folder.If so then how do i find the right file?
EDIT: My eclipse says that my debug key is in the default folder. So i renamed the debug.keystore file and ran the Eclipse to recreate it all over again. That resulted in producing a new SHA1 key. I used it to create a new Google Maps API v2 key but the result is still the same. I'm still unable to see the map.
EDIT2: Stupid me, I chose Google Map API V2 instead of Google Maps Android API V2.
This question can be closed. Thanks.
Here are all the code files:
xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="#+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
map:cameraBearing="112.5"
map:cameraTargetLat="-33.796923"
map:cameraTargetLng="150.922433"
map:cameraTilt="30"
map:cameraZoom="13"
map:mapType="normal"
map:uiCompass="false"
map:uiRotateGestures="true"
map:uiScrollGestures="false"
map:uiTiltGestures="true"
map:uiZoomGestures="true" />
</LinearLayout>
Map Fragmentactivity class:
package com.eadesign.skygiraffefinalv2;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.maps.GoogleMap;
import android.os.Bundle;
import com.google.android.gms.maps.*;
import android.widget.ImageView;
import android.widget.TextView;
public class Map extends android.support.v4.app.FragmentActivity
{
private GoogleMap map;
#Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()) == 0)
{
map = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
// map.setMapType(GoogleMap.MAP_TYPE_HYBRID);
}
}}
manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eadesign.skygiraffefinalv2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/>
<permission android:name="com.eadesign.skygiraffefinalv2.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<uses-permission android:name="com.eadesign.skygiraffefinalv2.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET" />
<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-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="#drawable/sgicon90"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen">
<activity
android:name=".Map"
android:label="#string/app_name">
<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.maps.v2.API_KEY"
android:value="My key"/>
</application>
log from logcat:
ent.category.LAUNCHER] flg=0x10000000 cmp=com.eadesign.skygiraffefinalv2/.Map u=
0} from pid 1362
W/WindowManager( 148): Failure taking screenshot for (246x410) to layer 21010
D/AndroidRuntime( 1362): Shutting down VM
I/ActivityManager( 148): Start proc com.eadesign.skygiraffefinalv2 for activity
com.eadesign.skygiraffefinalv2/.Map: pid=1373 uid=10046 gids={3003, 1015, 1028}
D/dalvikvm( 1373): Not late-enabling CheckJNI (already on)
D/dalvikvm( 1362): GC_CONCURRENT freed 99K, 77% free 483K/2048K, paused 1ms+1ms,
total 13ms
D/jdwp ( 1362): Got wake-up signal, bailing out of select
D/dalvikvm( 1362): Debugger has detached; object registry had 1 entries
E/jdwp ( 1373): Failed sending reply to debugger: Broken pipe
D/dalvikvm( 1373): Debugger has detached; object registry had 2 entries
E/Trace ( 1373): error opening trace file: No such file or directory (2)
D/dalvikvm( 1373): GC_CONCURRENT freed 204K, 3% free 8264K/8519K, paused 89ms+6m
s, total 161ms
D/dalvikvm( 1373): WAIT_FOR_CONCURRENT_GC blocked 33ms
E/ActivityThread( 1373): Failed to find provider info for com.google.settings
E/ActivityThread( 1373): Failed to find provider info for com.google.settings
D/dalvikvm( 1373): GC_CONCURRENT freed 312K, 5% free 8471K/8839K, paused 82ms+10
5ms, total 268ms
E/ActivityThread( 1373): Failed to find provider info for com.google.android.gsf
.gservices
E/ActivityThread( 1373): Failed to find provider info for com.google.android.gsf
.gservices
D/dalvikvm( 1373): GC_CONCURRENT freed 227K, 4% free 8797K/9095K, paused 91ms+11
0ms, total 300ms
D/libEGL ( 1373): Emulator without GPU support detected. Fallback to software r
enderer.
I/Choreographer( 1373): Skipped 54 frames! The application may be doing too muc
h work on its main thread.
D/gralloc_goldfish( 1373): Emulator without GPU emulation detected.
D/libEGL ( 1373): loaded /system/lib/egl/libGLES_android.so
I/ActivityManager( 148): Displayed com.eadesign.skygiraffefinalv2/.Map: +3s545ms
I/Choreographer( 1373): Skipped 75 frames! The application may be doing too muc
h work on its main thread.
In my case I chose Google Maps API V2 instead of Google Maps Android API V2. After changing that the problem was gone. So this code is perfectly fine to create a full screen Google map and the question can be closed.
Thanks.

Issues with ActionBarSherlock - Install fails on Android 2.3.7

I have a problem using ActionBarSherlock in one of my projects. My App installs fine when pushing it to my Nexus 4, but when I try to install it to my HTC Desire (CM7 with Android 2.3.7 - API Level 10) I get the following error.
[2013-02-03 18:47:44 - MyApp] Project dependency found, installing: Actionbar
[2013-02-03 18:47:44 - Actionbar] Uploading Actionbar.apk onto device 'HT042PL03910'
[2013-02-03 18:47:44 - Actionbar] Installing Actionbar.apk...
[2013-02-03 18:47:47 - Actionbar] Installation error: INSTALL_FAILED_OLDER_SDK
[2013-02-03 18:47:47 - Actionbar] Please check logcat output for more details.
[2013-02-03 18:47:47 - MyApp] Launch canceled!
I am using Sherlock 4.2.0 as a libraryproject and added the R11 of android-support-v4. Sherlock itself is configured like this:
Manifest:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
Project-Properties:
android.library=true
# Project target.
target=android-14
My application uses the following settings:
Manifest:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" />
Project-Properties:
target=Google Inc.:Google APIs:16
android.library.reference.1=../ActionbarSherlock
I went through the whole logcat output but couldn't find anything helpful. Has anybody else experienced this and can help me?
========= EDIT ===============
Manifest of my App (mindSdk changed to 8):
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.hsrm.medieninf.mobcomp.klingelapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<permission
android:name="de.hsrm.medieninf.mobcomp.klingelapp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="de.hsrm.medieninf.mobcomp.klingelapp.permission.C2D_MESSAGE" />
<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Sherlock.Light" >
<uses-library android:name="com.google.android.maps" />
(...Activities and Services here ...)
</application>
</manifest>
Full Logcat from new Emulator AVD with Google APIs Level 10:
02-03 21:09:59.647: I/PackageManager(77): Removing non-system package:de.hsrm.medieninf.mobcomp.klingelapp
02-03 21:09:59.647: I/ActivityManager(77): Force stopping package de.hsrm.medieninf.mobcomp.klingelapp uid=10038
02-03 21:09:59.877: D/dalvikvm(77): GC_CONCURRENT freed 1369K, 49% free 5484K/10631K, external 3226K/4029K, paused 4ms+12ms
02-03 21:09:59.977: D/PackageManager(77): Scanning package de.hsrm.medieninf.mobcomp.klingelapp
02-03 21:09:59.977: I/PackageManager(77): Package de.hsrm.medieninf.mobcomp.klingelapp codePath changed from /data/app/de.hsrm.medieninf.mobcomp.klingelapp-1.apk to /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk; Retaining data and using new
02-03 21:09:59.977: I/PackageManager(77): Unpacking native libraries for /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:00.047: D/installd(35): DexInv: --- BEGIN '/data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk' ---
02-03 21:10:04.096: D/dalvikvm(598): DexOpt: load 250ms, verify+opt 957ms
02-03 21:10:04.306: D/installd(35): DexInv: --- END '/data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk' (success) ---
02-03 21:10:04.306: W/PackageManager(77): Code path for pkg : de.hsrm.medieninf.mobcomp.klingelapp changing from /data/app/de.hsrm.medieninf.mobcomp.klingelapp-1.apk to /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:04.306: W/PackageManager(77): Resource path for pkg : de.hsrm.medieninf.mobcomp.klingelapp changing from /data/app/de.hsrm.medieninf.mobcomp.klingelapp-1.apk to /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:04.306: D/PackageManager(77): Services: de.hsrm.medieninf.mobcomp.klingelapp.GCMIntentService de.hsrm.medieninf.mobcomp.klingelapp.services.LocationService de.hsrm.medieninf.mobcomp.klingelapp.services.SyncService de.hsrm.medieninf.mobcomp.klingelapp.services.AppService de.hsrm.medieninf.mobcomp.klingelapp.services.AuthService
02-03 21:10:04.306: D/PackageManager(77): Receivers: com.google.android.gcm.GCMBroadcastReceiver
02-03 21:10:04.306: D/PackageManager(77): Activities: de.hsrm.medieninf.mobcomp.klingelapp.ui.LoginActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.MessageEditor de.hsrm.medieninf.mobcomp.klingelapp.ui.StartActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.ContactsActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.KlingelSettings de.hsrm.medieninf.mobcomp.klingelapp.ui.NewStartActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.MessagesActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.MessageDetails de.hsrm.medieninf.mobcomp.klingelapp.ui.RegisterActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.FriendRequestActivity
02-03 21:10:04.306: D/PackageManager(77): Permissions: de.hsrm.medieninf.mobcomp.klingelapp.permission.C2D_MESSAGE
02-03 21:10:04.326: I/ActivityManager(77): Force stopping package de.hsrm.medieninf.mobcomp.klingelapp uid=10038
02-03 21:10:04.436: I/installd(35): move /data/dalvik-cache/data#app#de.hsrm.medieninf.mobcomp.klingelapp-2.apk#classes.dex -> /data/dalvik-cache/data#app#de.hsrm.medieninf.mobcomp.klingelapp-2.apk#classes.dex
02-03 21:10:04.436: D/PackageManager(77): New package installed in /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:04.446: W/PackageManager(77): Unknown permission android.permission.ADD_SYSTEM_SERVICE in package com.android.phone
02-03 21:10:04.446: W/PackageManager(77): Not granting permission android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS to package com.android.browser (protectionLevel=2 flags=0x9be45)
02-03 21:10:04.457: W/PackageManager(77): Unknown permission com.google.android.gm.permission.WRITE_GMAIL in package com.android.settings
02-03 21:10:04.457: W/PackageManager(77): Unknown permission com.google.android.gm.permission.READ_GMAIL in package com.android.settings
02-03 21:10:04.466: W/PackageManager(77): Unknown permission android.permission.READ_OWNER_DATA in package com.android.email
02-03 21:10:04.476: W/PackageManager(77): Unknown permission com.android.providers.im.permission.READ_ONLY in package com.google.android.apps.maps
02-03 21:10:04.476: W/PackageManager(77): Not granting permission android.permission.DEVICE_POWER to package com.android.deskclock (protectionLevel=2 flags=0x8be45)
02-03 21:10:04.606: I/ActivityManager(77): Force stopping package de.hsrm.medieninf.mobcomp.klingelapp uid=10038
02-03 21:10:04.706: D/dalvikvm(260): GC_EXPLICIT freed 1K, 49% free 3020K/5831K, external 4756K/5631K, paused 67ms
02-03 21:10:04.746: D/dalvikvm(226): GC_EXPLICIT freed 94K, 51% free 2964K/5959K, external 1625K/2137K, paused 75ms
02-03 21:10:04.806: W/RecognitionManagerService(77): no available voice recognition services found
02-03 21:10:04.856: D/GTalkService(287): handlePackageInstalled: re-initialize providers
02-03 21:10:04.856: D/GTalkService(287): [RawStanzaProvidersMgr] ##### searchProvidersFromIntent
02-03 21:10:04.856: D/GTalkService(287): [RawStanzaProvidersMgr] no intent receivers found
02-03 21:10:05.136: I/Launcher(260): setLoadOnResume
02-03 21:10:05.226: D/dalvikvm(77): GC_EXPLICIT freed 1202K, 54% free 4962K/10631K, external 3226K/4029K, paused 75ms
02-03 21:10:05.256: I/installd(35): unlink /data/dalvik-cache/data#app#de.hsrm.medieninf.mobcomp.klingelapp-1.apk#classes.dex
02-03 21:10:05.296: D/AndroidRuntime(589): Shutting down VM
02-03 21:10:05.306: D/dalvikvm(589): GC_CONCURRENT freed 101K, 72% free 295K/1024K, external 0K/0K, paused 0ms+1ms
02-03 21:10:05.306: D/jdwp(589): Got wake-up signal, bailing out of select
02-03 21:10:05.306: D/dalvikvm(589): Debugger has detached; object registry had 1 entries
02-03 21:10:05.326: I/dalvikvm(589): JNI: AttachCurrentThread (from ???.???)
02-03 21:10:05.326: I/AndroidRuntime(589): NOTE: attach of thread 'Binder Thread #3' failed
02-03 21:10:06.686: D/AndroidRuntime(604): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-03 21:10:06.686: D/AndroidRuntime(604): CheckJNI is ON
02-03 21:10:07.106: D/AndroidRuntime(604): Calling main entry com.android.commands.pm.Pm
02-03 21:10:07.196: D/dalvikvm(442): GC_EXPLICIT freed 10K, 51% free 2727K/5511K, external 1625K/2137K, paused 43ms
02-03 21:10:07.206: W/ActivityManager(77): No content provider found for:
02-03 21:10:07.306: W/ActivityManager(77): No content provider found for:
02-03 21:10:07.316: D/PackageParser(77): Scanning package: /data/app/vmdl-63285559.tmp
02-03 21:10:07.326: W/PackageParser(77): /data/app/vmdl-63285559.tmp (at Binary XML file line #8): Requires newer sdk version #16 (current version is #10)
So instead of searching for where I went wrong, I checked out a working revision without sherlock. I then added sherlock as a library and made the same changes to my activites I did yesterday. But now, install works fine.

Categories

Resources