Error when setting the android preferences in eclipse.

by andersg » Wed, 13 May 2009 03:24:32 GMT


Sponsored Links
 Hi,
I can't get the android sdk working in eclipse. I followed the
installation guide, but when I point android preferences to my android
sdk lib under "Window > preferences > android" I get the following
error.

"Error loading the SDK

Error: Error parsing the SDK.
/home/anders/opt/android-sdk-linux_x86-1.1_r1/plartforms is missing"


--~--~---------~--~----~------------~-------~--~----~



Error when setting the android preferences in eclipse.

by Paul Turchenko » Wed, 13 May 2009 05:22:20 GMT


 It seems like you have outdated SDK. New eclipse add-on (starting from
v. 0.9.0) doesn't recognize SDK 1.1. However, if you need to develop
for SDK 1.1 you simply set target name to android 1.1 and reference
1.1. library from your application. This should work.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Error when setting the android preferences in eclipse.

by byroneekh...@gmail.com » Fri, 22 May 2009 01:56:59 GMT


 Hi,

I have the same problem,
I work with: Eclipse Platform Version: 3.4.2
I have downloaded android-sdk-windows-1.5_r1 but when I set the
location to:
D:\Android\android-sdk-windows-1.1_r1

I get the same error:

"Error loading the SDK

Error: Error parsing the SDK.
D:\Android\android-sdk-windows-1.1_r1/plartforms is missing"

While using 1.5 SDK!

please help... :), thnx

Byron





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. [WTHelp] Lupa Pattern G-Tab

Permisi, mohon bantuannya...

As subject...
G-Tab milik teman saya lupa Lock Pattern-nya.

Bisa dibantu, harus bagaimana agar bisa kembali Unlock Pattern tersebut.

Terima kasih.



[Sir Phetex]
-- 
===============

2. Read sent sms in inbox with 10 min interval

Hello,

So I'm working on an app that should read sent sms in inbox for every
10 min.
I use a logic to compare the device's time and the time sms is sent.
And if the time sms is sent > the time of the device the toast will
pop up and show the sms
But I can't get the result I want, the toast is always giving the same
sms all the time.
So could anyone help me?

Here is my code:

package com.sent.sms;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.util.Log;
import android.widget.Toast;

public class SentSMS extends Service{
        int saveDate = 0;
    int saveMonth = 0;
    int saveYear = 0;

    int saveHour = 0;
    int saveMinute = 0;
    int saveSecond = 0;

    int date = 0;
    int month = 0;
    int year = 0;

    int hours = 0;
    int minutes = 0;
    int seconds = 0;

    String[] projection = new String[]{"_id", "address", "body",
"date"};
    Uri uriSMSURI = Uri.parse("content://sms/sent");

    private Context ctx;

    private static Timer timer = new Timer();

        @Override
        public void onCreate() {
                super.onCreate();
                ctx = this;
                timer.scheduleAtFixedRate(new mainTask(), 0,60000);
        }

        @Override
        public IBinder onBind(Intent intent) {
                return null;
        }

        private class mainTask extends TimerTask{
        public void run(){
                doAllThing.sendEmptyMessage(0);
        }
    }

        private final Handler doAllThing = new Handler(){
        @Override
        public void handleMessage(Message msg){
                checkSMS();
                saveTime();
        }
    };

        private void saveTime(){
            date = Calendar.getInstance().get(Calendar.DATE);
            month = Calendar.getInstance().get(Calendar.MONTH)+1;
            year = Calendar.getInstance().get(Calendar.YEAR);
        hours = new Date().getHours();
        minutes = new Date().getMinutes();
        seconds = new Date().getSeconds();
        }

        public void checkSMS(){
              String sms = "";
              Cursor cursor = null;

              try {
                    cursor = getContentResolver().query(uriSMSURI
                            , projection
                            , null //selection
                            , null //selectionArgs
                            , null); //sortOrder

                    if (cursor != null && cursor.moveToFirst()) {
                        do {
                            String to =
cursor.getString(cursor.getColumnIndex("address"));
                            String body =
cursor.getString(cursor.getColumnIndex("body"));

                            String dateSMS =
cursor.getString(cursor.getColumnIndex("date"));
                            String monthSMS =
cursor.getString(cursor.getColumnIndex("date"));
                            String yearSMS =
cursor.getString(cursor.getColumnIndex("date"));

                            String hourSMS =
cursor.getString(cursor.getColumnIndex("date"));
                            String minuteSMS =
cursor.getString(cursor.getColumnIndex("date"));
                            String secondSMS =
cursor.getString(cursor.getColumnIndex("date"));

                            SimpleDateFormat formatDate = new
SimpleDateFormat("d");
                            SimpleDateFormat formatMonth = new
SimpleDateFormat("M");
                            SimpleDateFormat formatYear = new
SimpleDateFormat("yyyy");

                            SimpleDateFormat formatHour = new
SimpleDateFormat("H");
                            SimpleDateFormat formatMinute = new
SimpleDateFormat("m");
                            SimpleDateFormat formatSecond = new
SimpleDateFormat("s");

                            dateSMS = formatDate.format(new
Date(Long.parseLong(dateSMS)));
                            monthSMS = formatMonth.format(new
Date(Long.parseLong(monthSMS)));
                            yearSMS = formatYear.format(new
Date(Long.parseLong(yearSMS)));

                            hourSMS = formatHour.format(new
Date(Long.parseLong(hourSMS)));
                            minuteSMS = formatMinute.format(new
Date(Long.parseLong(minuteSMS)));
                            secondSMS = formatSecond.format(new
Date(Long.parseLong(secondSMS)));

                            saveDate = Integer.parseInt(dateSMS.trim());
                            saveMonth = Integer.parseInt(monthSMS.trim());
                            saveYear = Integer.parseInt(yearSMS.trim());

                            saveHour = Integer.parseInt(hourSMS.trim());
                            saveMinute = Integer.parseInt(minuteSMS.trim());
                            saveSecond = Integer.parseInt(secondSMS.trim());

                            if(date == 0 && month == 0 && year == 0 && hours ==
0 && minutes == 0 && seconds == 0){
                                sms += 
"Time:"+saveDate+"/"+saveMonth+"/"+saveYear
+"/"+" - "+saveHour+":"+saveMinute+":"+saveSecond+"To:"+to+"Body:"+body
+"\n";
                            }else{

                                if(saveMinute > minutes){
                                        sms += 
"Time:"+saveDate+"/"+saveMonth+"/"+saveYear
+"/"+" - "+saveHour+":"+saveMinute+":"+saveSecond+"To:"+to+"Body:"+body
+"\n";
                                    }else if(saveHour > hours){
                                        sms += 
"Time:"+saveDate+"/"+saveMonth+"/"+saveYear
+"/"+" - "+saveHour+":"+saveMinute+":"+saveSecond+"To:"+to+"Body:"+body
+"\n";
                                    }else if(saveDate > date){
                                        sms += 
"Time:"+saveDate+"/"+saveMonth+"/"+saveYear
+"/"+" - "+saveHour+":"+saveMinute+":"+saveSecond+"To:"+to+"Body:"+body
+"\n";
                                    }else if(saveMonth > month){
                                        sms += 
"Time:"+saveDate+"/"+saveMonth+"/"+saveYear
+"/"+" - "+saveHour+":"+saveMinute+":"+saveSecond+"To:"+to+"Body:"+body
+"\n";
                                    }else if(saveYear > year){
                                        sms += 
"Time:"+saveDate+"/"+saveMonth+"/"+saveYear
+"/"+" - "+saveHour+":"+saveMinute+":"+saveSecond+"To:"+to+"Body:"+body
+"\n";
                                    }
                            }
                        } while (cursor.moveToNext());
                    }
                } finally {
                    if (cursor != null) {
                        cursor.close();
                }
            }
                Toast.makeText(this, sms,Toast.LENGTH_LONG).show();
        }
}

Thank you very much.
Sorry for the long post :)

-- 

3. Hide My Files from Another Application

4. Facebook using Widget ?

5. GIF image download

6. how android application connect with the pc connected by usb

7. Unable to start a service from a Broadcast Receiver