Google Maps Android API v2 application crash -


i'm trying sample code of android 'google maps android api v2' working. project built without errors. however, when try run app on everpad , app crashes immediately.

the logcat output:

08-30 17:12:42.620: e/dalvikvm(4352): not find class 'com.dvp.android.gallery.gps', referenced method com.dvp.android.gallery.acceuil$5.onclick 08-30 17:12:47.670: e/inputdispatcher(3263): motion event has invalid action code 0xa 08-30 17:12:47.760: e/inputdispatcher(3263): motion event has invalid action code 0x9 08-30 17:12:47.760: e/inputdispatcher(3263): motion event has invalid action code 0x7 08-30 17:12:47.850: e/androidruntime(4352): fatal exception: main 08-30 17:12:47.850: e/androidruntime(4352): java.lang.noclassdeffounderror: com.dvp.android.gallery.gps 08-30 17:12:47.850: e/androidruntime(4352):     @ com.dvp.android.gallery.acceuil$5.onclick(acceuil.java:57) 

the manifest :

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"       package="com.dvp.android.gallery"       android:versioncode="1"       android:versionname="1.0">     <permission             android:name="com.dvp.android.gallery.maps.permission.maps_receive"             android:protectionlevel="signature" />     <uses-feature             android:glesversion="0x00020000"             android:required="true"/>      <application android:icon="@drawable/ic_bardo" android:label="@string/app_name">         <activity android:name=".acceuil"                   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=".objets" android:label="objets">  </activity>         <activity android:name=".gps"                   android:label="gps">         </activity>         <activity android:name=".detail" android:label="detail"></activity>         <activity                 android:name=".galeries"                 android:label="galeries"                 />         <activity                 android:name=".evennements"                 android:label="evennements"/>         <activity                 android:name=".infos"                 android:label="infos"/>     </application>     <meta-data             android:name="com.google.android.maps.v2.api_key"             android:value="aizasya0hmttglqlyaq6jous0imbjt7gmuhyk0c"/>      <uses-sdk android:minsdkversion="4" />       <uses-permission android:name="com.dvp.android.gallery.maps.permission.maps_receive" />     <uses-permission android:name="android.permission.internet" />     <uses-permission android:name="android.permission.access_mock_location"/>     <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" />  </manifest>  

the java code

package com.dvp.android.gallery;  import android.os.bundle; import android.support.v4.app.fragmentactivity;  import com.google.android.gms.maps.supportmapfragment;   public class gps extends fragmentactivity{     @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.gps);        supportmapfragment fragment = new supportmapfragment();        fragment.getfragmentmanager().begintransaction().add(android.r.id.content, fragment).commit();      }   } 

and xml :

<?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com/apk/res/android"           android:id="@+id/map"           android:layout_width="fill_parent"           android:layout_height="fill_parent"           class="com.google.android.gms.maps.supportmapfragment" /> 

i googled , found no information exception. i'm confused problem , don't know how fix it. have idea how fix it? thanks.

there kind of mismatch between package specified in manifest file , package have provided activities in it.

try change:

 <activity         android:name="in.wptrafficanalyzer.locationgooglemapv2demo.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> 

to:

 <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> 

and don't write package cased latters , not, change permissions package it's written in package section:

 <permission       android:name="in.wptrafficanalyzer.locationgooglemapv2demo.permission.maps_receive"       android:protectionlevel="signature"/>  <uses-permission android:name="in.wptrafficanalyzer.locationgooglemapv2demo.permission.maps_receive"/> 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -