Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding Google Maps Android API V2 fail with Gradle: UNEXPECTED TOP-LEVEL EXCEPTION
    primarykey
    data
    text
    <p>I want to put Google Maps Android API V2 on my project but I have an issue.</p> <p>AndroidManifest.xml</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.****" android:versionCode="1" android:versionName="1.0"&gt; &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16"/&gt; &lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt; &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/&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" android:uiOptions="splitActionBarWhenNarrow"&gt; &lt;activity android:name="com.****.android.****.LoginActivity" android:label="@string/app_name" android:windowSoftInputMode="adjustResize|stateVisible"&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;activity android:name=".fragmentmodule.AppMainTabActivity" android:label="activity_main"/&gt; &lt;activity android:name=".PDFActivity" android:label="activity_pdf"/&gt; &lt;meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBfD***********QaNXISLpWaku"/&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>build.gradle</p> <pre><code>buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' dependencies { compile fileTree(dir: 'libs', include: '*.jar') compile 'com.google.android.gms:play-services:3.1.36' } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 8 targetSdkVersion 16 } } </code></pre> <p>myactivity.xml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="35dp" android:layout_gravity="left|center_vertical" android:layout_marginTop="10dp" android:gravity="center_horizontal"&gt; &lt;Button style="?android:attr/buttonStyleSmall" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="Note" android:id="@+id/details_button_note"/&gt; &lt;Button style="?android:attr/buttonStyleSmall" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="Localisation" android:id="@+id/details_button_location"/&gt; &lt;Button style="?android:attr/buttonStyleSmall" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="Mail" android:id="@+id/details_button_mail"/&gt; &lt;Button style="?android:attr/buttonStyleSmall" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="Favori" android:id="@+id/details_button_favori"/&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp"&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Organisme" android:id="@+id/details_textView_organisme" android:layout_gravity="left|center_vertical" android:layout_marginTop="10dp" android:textColor="@color/blueEmp" android:textSize="14dp"/&gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical"&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Date d'expiration :" android:id="@+id/details_textViewBVF_date" android:layout_gravity="center_horizontal|top" android:textColor="#000000" android:textSize="12dp"/&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="30/10/88 à 3h00" android:id="@+id/details_textView_date" android:layout_gravity="center_horizontal|bottom" android:layout_marginLeft="7dp" android:textColor="#000000" android:textStyle="bold" android:textSize="12dp"/&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:id="@+id/linearLayout"&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Departement :" android:id="@+id/details_textViewBF_dpt" android:layout_gravity="center_horizontal|top" android:textColor="@color/gris_emp" android:textSize="10dp"/&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="75" android:id="@+id/details_textView_dpt" android:layout_gravity="center_horizontal|bottom" android:layout_marginLeft="7dp" android:textColor="@color/gris_emp" android:textStyle="bold" android:textSize="10dp"/&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="false"&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;!-- This line doesn't works --&gt; &lt;WebView android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/details_webview" android:layout_gravity="center" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="10dp"/&gt; &lt;Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Ouvrir le PDF" android:id="@+id/details_button_pdf" android:layout_gravity="center" android:minWidth="200dp" android:minHeight="100dp"/&gt; &lt;EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/details_edittext_note" android:layout_gravity="center_horizontal|top" android:layout_marginTop="20dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"/&gt; &lt;/FrameLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p><strong>An error occurred</strong></p> <pre><code>Gradle: Error while executing dx command Gradle: UNEXPECTED TOP-LEVEL EXCEPTION: Gradle: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompatHoneycomb; Gradle: at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123) Gradle: at com.android.dx.dex.file.DexFile.add(DexFile.java:163) Gradle: at com.android.dx.command.dexer.Main.processClass(Main.java:490) Gradle: 1 error; aborting Gradle: Execution failed for task ':****:dexDebug'. </code></pre> <h2>I have installed (with SDK Manager) the last version of :</h2> <ul> <li>Android Support Repository</li> <li>Android Support Library</li> <li>Google Play Services</li> <li>Google Repository</li> </ul> <p>Someone know why I have this problem ?</p>
    singulars
    1. This table or related slice is empty.
    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.
    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