Some input files use or override a deprecated API recompile Xlin

Fermé
redss - Modifié par KX le 15/01/2017 à 15:32
Whismeril Messages postés 19024 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 18 avril 2024 - 15 janv. 2017 à 14:47
Hello,i'm facing this problem days now, im a newbie at this
this is the path error
package org.cocos2d;

import java.text.Collator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.app.ListActivity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleAdapter;

public class Cocos2D extends ListActivity {

@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);        
        setListAdapter(new SimpleAdapter(this,
                (List<Map<String, ?>>)getData("org.cocos2d.tests"),
                android.R.layout.simple_list_item_1, new String[]{"title"},
                new int[]{android.R.id.text1}));
        getListView().setTextFilterEnabled(true);
    }

protected List<?> getData(String prefix) {
        List<Map<String,?>> myData = new ArrayList<Map<String,?>>();


Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
        mainIntent.addCategory(Intent.CATEGORY_TEST);

PackageManager pm = getPackageManager();
        List<ResolveInfo> list = pm.queryIntentActivities(mainIntent, 0);

if (null == list)
            return myData;

/*
        String[] prefixPath;
        if (prefix.equals("")) {
            prefixPath = null;
        } else {
            prefixPath = prefix.split("/");
        }*/
        int len = list.size();

please help
A voir également:

1 réponse

Whismeril Messages postés 19024 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 18 avril 2024 928
15 janv. 2017 à 14:47
Bonjour
ce forum est francophone, tu as donc deux possibilités:
  • reformuler ta question en Français
  • Aller sur notre site international https://ccm.net/


D'autre part, à fin de rendre ton code plus facilement lisible, et ainsi donner envie à un bénévole de s'y pencher, utilise la coloration syntaxique https://codes-sources.commentcamarche.net/faq/10686-le-nouveau-codes-sources-comment-ca-marche#balises-code
0