Cannot find "gen" folder... it's right there!

by DulcetTone » Tue, 20 Jul 2010 00:28:43 GMT


Sponsored Links
  have Eclipse build issues.
I am running ADT 0.9.7 from 1157 May 7th 2010 and a freshly-updated
copy of Eclipse 3.5 IDE for Java

I have an Android project which depends on an underlying "Core"
Android project, and it claims not to find its "gen" folder, though it
is exactly where it has ever been (though the project dependency is a
new wrinkle). The project properties shows that it knows where it
lives.

Any ideas?

Tony


Here is how the .log file reports the issue:


!ENTRY org.eclipse.jdt.ui 4 10001 2010-07-19 11:25:23.592
!MESSAGE Internal Error
!STACK 1
Java Model Exception: Java Model Status [gen [in CD1] does not exist]
at
org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:
502)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:
246)
at
org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:
515)
at
org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:
252)
at
org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:
238)
at
org.eclipse.jdt.internal.core.PackageFragmentRoot.getKind(PackageFragmentRoot.java:
477)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java:
645)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.handleAffectedChildren(PackageExplorerContentProvider.java:
791)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java:
734)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.handleAffectedChildren(PackageExplorerContentProvider.java:
791)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java:
734)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.elementChanged(PackageExplorerContentProvider.java:
124)
at org.eclipse.jdt.internal.core.DeltaProcessor
$3.run(DeltaProcessor.java:1557)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java:
1547)
at
org.eclipse.jdt.internal.core.DeltaProcessor.firePostChangeDelta(DeltaProcessor.java:
1381)
at
org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java:
1357)
at
org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:
1958)
at
org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:
470)
at org.eclipse.core.internal.events.NotificationManager
$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:
285)
at
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:
149)
at
org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:
313)
at
org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:
1022)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
45)
at or



Other Threads

1. Get a 404 when trying to install eclipse plug in

Get 404 with either one:
https://dl-ssl.google.com/android/eclipse/site.xml
http://dl-ssl.google.com/android/eclipse/site.xml
Thx

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

2. creating Services for location bases application

Hi,

    I am new to android Development.
    I have created a location based application which runs in the
Background. I dont get any errors but when i try to check it out using
emulator. I get a message saying that the applicataion has stopped
unexpectedly, Pls try again.
Can some one help me out with this problem.

Service File:

package com.Location.LBS;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.telephony.gsm.GsmCellLocation;
import android.util.Log;
import android.widget.Toast;
import android.os.Handler;

class BackgroundServiceTask implements Runnable{

        private static final String  LOG_TAG="BackgroundService";
        private Handler serviceHandler;
        private int countDown = 0;
        private long interval= 0L;

        public BackgroundServiceTask(int countDown, long interval, Handler
serviceHandler)
        {
                this.countDown = countDown;
                this.interval = interval;
                this.serviceHandler = serviceHandler;
        }

        public void run()
        {
                Log.d(LOG_TAG,"Counter:"+ countDown);
                if(--countDown > 0)
                        serviceHandler.postDelayed(this, interval);
        }



}

public class MyService extends Service {

        private static final String LOG_TAG ="Background Service";
        private Handler serviceHandler = new Handler();
        private static final int COUNTDOWN_LIMIT = 10;
        private static final long COUNTDOWN_INTERVAL = 3*1000L;

        protected void onStart(int startId,Bundle arguments)
        {
                super.onStart(null , startId);
                Log.d(LOG_TAG,"onstart");

                GsmCellLocation location;
                int cellID, lac;
                final String latLongString;

                 TelephonyManager tm = (TelephonyManager)getSystemService
(Context.TELEPHONY_SERVICE);
                location = (GsmCellLocation) tm.getCellLocation();


                if(location != null)
                        {
                         cellID =location.getCid();
                        lac = location.getLac();


                                latLongString="CellID:"+ 2675+"\n Lac:"+8894;

                                Log.i(getClass().getSimpleName(), "Data From 
Location:" +
latLongString);

                                Toast.makeText(this,"Location:"+latLongString ,
Toast.LENGTH_SHORT);
                                }
                else
                        {
                                latLongString ="No Location found";
                        }



                BackgroundServiceTask bst = new BackgroundServiceTask
(COUNTDOWN_LIMIT, COUNTDOWN_INTERVAL, serviceHandler);
                serviceHandler.postDelayed(bst,COUNTDOWN_INTERVAL);
                stopSelf();

        }

        public void onDestroy()
        {
                super.onDestroy();
                Log.d(LOG_TAG, "onDestory");
        }


        @Override
        public IBinder onBind(Intent intent) {
                // TODO Auto-generated method stub
                return null;
        }

}


Broadcast receiver file:

package com.Location.LBS;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
//import android.os.Bundle;
import android.content.ComponentName;
import android.util.Log;

public class BootCompletedIntentReceiver extends BroadcastReceiver {

        private static final String LOG_TAG ="BootCompletedIntentReceiver";

        public BootCompletedIntentReceiver() {
                // TODO Auto-generated constructor stub
        }

        @Override
        public void onReceive(Context context, Intent intent) {
            // TODO Auto-generated method stub

                String action = intent.getAction();
                Log.d(LOG_TAG, action);
                if(action== null)
                        Log.e(LOG_TAG,"Action==null!");
                else if("android.intent.action.BOOT_COMPLETED".equals(action))
                {
                        Intent i = new Intent();
                        
i.setClassName("com.Location.LBS","com.Location.LBS.MyService");

                        ComponentName cname = context.startService(i);
                        if(cname == null)
                                Log.e(LOG_TAG, "Background Service was not 
Started!");
                        else
                                Log.d(LOG_TAG, "Background Service Started");
                }

        }

}


Activity File:


package com.Location.LBS;

import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;

public class LocationFinder extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);

        Intent i = new Intent();
        i.setClassName("com.Location.LBS",
"com.Location.LBS.MyService");
        startService(i);
    }
}

Manifest File:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.Location.LBS"
      android:versionCode="1"
      android:versionName="1.0.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".LocationFinder"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    <service
android:permission="android.permission.ACCESS_COARSE_LOCATION"
android:enabled="true" android:name="MyService"></service>
<receiver android:name="BootCompletedIntentReceiver"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED"></
receiver>
</application>
</manifest>




Thanks & Regards,
Pawan Kumar Venugopal

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

3. How to play youtube videos in an Android application?

4. automatic start using Alaram Manager problem

5. 鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

6. Internet on emulator

7. NFS Configuration on Zoom