Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Maps API 2 for Android “Unfortunately, [app] has stopped.” Unable to run the app
    primarykey
    data
    text
    <p>I'm a newbie to android programming and I've run through the android developers guide and YouTube guides ,and also checked the other similar questions asked here, but am still unable to load a map on AVD emulator. I have also imported google-play-services_lib and <em>Android build target</em> : <strong>Android 4.2.2 API 17</strong></p> <p>I'm able to install my app successfully on emulator but every time when I try to run it, it gives the notification of "Unfortunately, [app] has stopped."</p> <p>Any attempt to help would be much appreciated. here's my code:</p> <p><strong>manifest.xml file:</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.sitemarker" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17" /&gt; &lt;permission android:name="com.android.sitemarker.permission.MAPS_RECEIVE" android:protectionLevel="signature" /&gt; &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt; &lt;uses-permission android:name="com.android.sitemarker.permission.MAPS_RECEIVE"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;activity android:name="com.android.sitemarker.MainActivity" android:label="@string/app_name" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="xxxx-xxxx-xxxxx" /&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p><strong>main.xml file:</strong></p> <pre><code> &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" &gt; &lt;fragment android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.MapFragment" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p><strong>MainActivity.java file:</strong></p> <pre><code>package com.android.sitemarker; import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } </code></pre> <p><strong>Logcat</strong></p> <pre><code>05-31 08:33:33.989: E/AndroidRuntime(2125): ... 24 more </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload