0

For some strange reason I get

android.content.ActivityNotFoundException: No Activity found to handle Intent {  
    act=android.intent.action.VIEW dat=geo:0,0?q=Fitness24Seven, Malmö }

This application worked perfectly before I updated Eclipse. I tried searching SO for similiar issues but without luck. It may be something with the manifest intent filter, but I don't understand how to do it (IF that is the issue).

Here is my code:

package se.projektledningett.studentimalmo;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;

public class Fitness24SevenScreen extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_fitness24_seven_screen);
    // Show the Up button in the action bar.
    //setupActionBar();
}

/**
 * Set up the {@link android.app.ActionBar}, if the API is available.
 */
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getActionBar().setDisplayHomeAsUpEnabled(true);
    }
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.fitness24_seven_screen, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case android.R.id.home:
        // This ID represents the Home or Up button. In the case of this
        // activity, the Up button is shown. Use NavUtils to allow users
        // to navigate up one level in the application structure. For
        // more details, see the Navigation pattern on Android Design:
        //

        NavUtils.navigateUpFromSameTask(this);
        return true;
    }
    return super.onOptionsItemSelected(item);
}

public void openFitness24SevenWebpage(View view){
    Uri uriUrl = Uri.parse("http://www.fitness24seven.com");
    Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
    startActivity(launchBrowser);
}

public void openFitness24SevenMap(View view){
    Uri uri = Uri.parse("geo:0,0?q=Fitness24Seven, Malmö");

    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
    startActivity(intent);
}
}

Below is the manifest:

<activity
        android:name="se.projektledningett.studentimalmo.Fitness24SevenScreen"
        android:label="@string/title_activity_fitness24_seven_screen"
        android:parentActivityName="se.projektledningett.studentimalmo.FitnessTrainingScreen2" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="se.projektledningett.studentimalmo.FitnessTrainingScreen2" />
    </activity>

I don't understand why this occured after the update. I am getting really frustrated about all the strange errors that randomly apperas with Eclipse, the code and the environment. I really do not want to see any more android once this stupid project of mine is finished. If this isn't solved it will fail miserably. Why did it work perfectly before the update?

Emperor 2052
  • 517
  • 1
  • 5
  • 14
  • 1. After updating Android SDK and ADT make sure you have Android Build tools installed. Goto your android sdk manager check if Andorid Build Tools is installed. If not installed install the same.2. Try going to Project -> Properties -> Order & Export and ensure Android Private Libraries are checked for your project and for all other library projects you are using. – Raghunandan May 19 '13 at 10:49
  • Hi Raghunandan! Build tools installed to latest rev but private libraries were not checked. Still, the same error persist. – Emperor 2052 May 19 '13 at 11:49
  • This is quite peculiar. The application does not work in the emulator, no matter rev or version but works perfectly on a device. Good lord, I just wasted hours upon hours on this problem. – Emperor 2052 May 19 '13 at 12:23
  • I tested your code. works on device. google map apiv 2 does not work on emulator any more. Your emulator does not have any map app. A reason why it fails – Raghunandan May 19 '13 at 14:17
  • http://blog-emildesign.rhcloud.com/?p=527. this could help. edit or remove the above comment and refrain from using such remarks(ones in between (....)) again – Raghunandan May 20 '13 at 09:07
  • Yes, you are right. That was unprofessional of me. Correction humbly accepted. /SM – Emperor 2052 May 20 '13 at 10:28

0 Answers0