IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Android Studio Java Discussion :

Error Update google play services : android studio


Sujet :

Android Studio Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Février 2017
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 29
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2017
    Messages : 2
    Par défaut Error Update google play services : android studio
    Nom : Capture.PNG
Affichages : 782
Taille : 188,1 Ko
    Bonjour , je suis entrain de développer une app android avec android studio pour afficher des coordonnées GPS mais l’émulateur m'affiche ce problème

    Code MapActivity.java:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    package com.example.yasmine.stegmobile;
     
    import android.support.v4.app.FragmentActivity;
    import android.os.Bundle;
     
    import com.google.android.gms.maps.CameraUpdateFactory;
    import com.google.android.gms.maps.GoogleMap;
    import com.google.android.gms.maps.OnMapReadyCallback;
    import com.google.android.gms.maps.SupportMapFragment;
    import com.google.android.gms.maps.model.LatLng;
    import com.google.android.gms.maps.model.MarkerOptions;
     
    public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
     
        private GoogleMap mMap;
     
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_maps);
            // Obtain the SupportMapFragment and get notified when the map is ready to be used.
            SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                    .findFragmentById(R.id.map);
            mapFragment.getMapAsync(this);
        }
     
     
        /**
         * Manipulates the map once available.
         * This callback is triggered when the map is ready to be used.
         * This is where we can add markers or lines, add listeners or move the camera. In this case,
         * we just add a marker near Sydney, Australia.
         * If Google Play services is not installed on the device, the user will be prompted to install
         * it inside the SupportMapFragment. This method will only be triggered once the user has
         * installed Google Play services and returned to the app.
         */
        @Override
        public void onMapReady(GoogleMap googleMap) {
            mMap = googleMap;
     
            // Add a marker in Sydney and move the camera
            LatLng sydney = new LatLng(-34, 151);
            mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
            mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
        }
    }

    Code google_maps_api.xml:


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    package com.example.yasmine.stegmobile;
     
    import android.support.v4.app.FragmentActivity;
    import android.os.Bundle;
     
    import com.google.android.gms.maps.CameraUpdateFactory;
    import com.google.android.gms.maps.GoogleMap;
    import com.google.android.gms.maps.OnMapReadyCallback;
    import com.google.android.gms.maps.SupportMapFragment;
    import com.google.android.gms.maps.model.LatLng;
    import com.google.android.gms.maps.model.MarkerOptions;
     
    public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
     
        private GoogleMap mMap;
     
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_maps);
            // Obtain the SupportMapFragment and get notified when the map is ready to be used.
            SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                    .findFragmentById(R.id.map);
            mapFragment.getMapAsync(this);
        }
     
     
        /**
         * Manipulates the map once available.
         * This callback is triggered when the map is ready to be used.
         * This is where we can add markers or lines, add listeners or move the camera. In this case,
         * we just add a marker near Sydney, Australia.
         * If Google Play services is not installed on the device, the user will be prompted to install
         * it inside the SupportMapFragment. This method will only be triggered once the user has
         * installed Google Play services and returned to the app.
         */
        @Override
        public void onMapReady(GoogleMap googleMap) {
            mMap = googleMap;
     
            // Add a marker in Sydney and move the camera
            LatLng sydney = new LatLng(-34, 151);
            mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
            mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
        }
    }
    Merci d'avance .

  2. #2
    Membre très actif Avatar de jmonga
    Homme Profil pro
    Développeur Java
    Inscrit en
    Novembre 2014
    Messages
    175
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 29
    Localisation : Congo-Kinshasa

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2014
    Messages : 175
    Par défaut
    Il faut mettre à jour ton sdk.

    pour cela tu ouvre ton Android studio > clic sur Tools dans la barre de menu > clic sur sdk manager > une fois une fenêtre ouverte regarde en bas il Launch Standalone tu clic là.

    dans ton sdk manager décoche les propositions et va en bas ou il ya les proposition sur google.

    pour tes mise à jours

  3. #3
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Février 2017
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 29
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2017
    Messages : 2
    Par défaut
    j'ai déjà essayé ça , c'est pas lié aux mise à jour . c'est lié plutôt au clé API. Merci en tt cas

Discussions similaires

  1. Réponses: 0
    Dernier message: 22/11/2016, 21h36
  2. Réponses: 1
    Dernier message: 19/05/2016, 09h51
  3. Package Google Play Service version 13
    Par Slayes dans le forum Android
    Réponses: 0
    Dernier message: 21/02/2014, 08h03
  4. Google Play Service passe à la version 3.2
    Par Stéphane le calme dans le forum Actualités
    Réponses: 0
    Dernier message: 22/08/2013, 03h04
  5. Problème "import" google-play-service
    Par bruno2356 dans le forum Android
    Réponses: 1
    Dernier message: 06/02/2013, 15h37

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo