Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.

  1. #1
    Junior Member
    Join Date
    Aug 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Post How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.

    I am totally a newbie and not that much technical savvy.
    I created an android project in eclipse, and there is a default hello world code.
    But when I am hitting the run, errors happen and they are
    Installation failed due to invalid URI!
    Please check logcat output for more details.
    Launch canceled!

    The codes are given below

    package com.example.myfirstapp;
     
    import android.support.v7.app.ActionBarActivity;
    import android.os.Bundle;
    import android.view.Menu;
    import android.view.MenuItem;
     
    public class MainActivity extends ActionBarActivity {
     
    	@Override
    	protected void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.activity_main);
    	}
     
    	@Override
    	public boolean onCreateOptionsMenu(Menu menu) {
    		// Inflate the menu; this adds items to the action bar if it is present.
    		getMenuInflater().inflate(R.menu.main, menu);
    		return true;
    	}
     
    	@Override
    	public boolean onOptionsItemSelected(MenuItem item) {
    		// Handle action bar item clicks here. The action bar will
    		// automatically handle clicks on the Home/Up button, so long
    		// as you specify a parent activity in AndroidManifest.xml.
    		int id = item.getItemId();
    		if (id == R.id.action_settings) {
    			return true;
    		}
    		return super.onOptionsItemSelected(item);
    	}
    }

    and here goes the xml

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        tools:context="com.example.myfirstapp.MainActivity" >
     
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/hello_world" />
     
    </RelativeLayout>


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.

    Please check logcat output for more details.
    What was in the logcat? There will be important info there.
    If you don't understand my answer, don't ignore it, ask a question.

  3. The Following User Says Thank You to Norm For This Useful Post:

    kickass (September 4th, 2014)

  4. #3
    Junior Member
    Join Date
    Aug 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.

    09-04 12:12:48.460: D/AndroidRuntime(745): Shutting down VM
    09-04 12:12:48.460: W/dalvikvm(745): threadid=1: thread exiting with uncaught exception (group=0xb2aa5d70)
    09-04 12:12:48.470: E/AndroidRuntime(745): FATAL EXCEPTION: main
    09-04 12:12:48.470: E/AndroidRuntime(745): Process: com.example.myfirstapp, PID: 745
    09-04 12:12:48.470: E/AndroidRuntime(745): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myfirstapp/com.example.myfirstapp.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2197)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2258)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.app.ActivityThread.access$800(ActivityThre ad.java:138)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1209)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.os.Handler.dispatchMessage(Handler.java:10 2)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.os.Looper.loop(Looper.java:136)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.app.ActivityThread.main(ActivityThread.jav a:5026)
    09-04 12:12:48.470: E/AndroidRuntime(745): at java.lang.reflect.Method.invokeNative(Native Method)
    09-04 12:12:48.470: E/AndroidRuntime(745): at java.lang.reflect.Method.invoke(Method.java:515)
    09-04 12:12:48.470: E/AndroidRuntime(745): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:777)
    09-04 12:12:48.470: E/AndroidRuntime(745): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:602)
    09-04 12:12:48.470: E/AndroidRuntime(745): at dalvik.system.NativeStart.main(Native Method)
    09-04 12:12:48.470: E/AndroidRuntime(745): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
    09-04 12:12:48.470: E/AndroidRuntime(745): at com.android.internal.policy.impl.PhoneWindow.reque stFeature(PhoneWindow.java:275)
    09-04 12:12:48.470: E/AndroidRuntime(745): at com.android.internal.policy.impl.PhoneWindow.gener ateLayout(PhoneWindow.java:2872)
    09-04 12:12:48.470: E/AndroidRuntime(745): at com.android.internal.policy.impl.PhoneWindow.insta llDecor(PhoneWindow.java:3129)
    09-04 12:12:48.470: E/AndroidRuntime(745): at com.android.internal.policy.impl.PhoneWindow.setCo ntentView(PhoneWindow.java:303)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.app.Activity.setContentView(Activity.java: 1930)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.support.v7.app.ActionBarActivity.superSetC ontentView(ActionBarActivity.java:217)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.support.v7.app.ActionBarActivityDelegateIC S.setContentView(ActionBarActivityDelegateICS.java :110)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.support.v7.app.ActionBarActivity.setConten tView(ActionBarActivity.java:77)
    09-04 12:12:48.470: E/AndroidRuntime(745): at com.example.myfirstapp.MainActivity.onCreate(MainA ctivity.java:13)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.app.Activity.performCreate(Activity.java:5 242)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1087)
    09-04 12:12:48.470: E/AndroidRuntime(745): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2161)
    09-04 12:12:48.470: E/AndroidRuntime(745): ... 11 more
    09-04 12:17:48.600: I/Process(745): Sending signal. PID: 745 SIG: 9
    09-04 12:24:50.200: D/AndroidRuntime(786): Shutting down VM
    09-04 12:24:50.200: W/dalvikvm(786): threadid=1: thread exiting with uncaught exception (group=0xb2aa5d70)
    09-04 12:24:50.210: E/AndroidRuntime(786): FATAL EXCEPTION: main
    09-04 12:24:50.210: E/AndroidRuntime(786): Process: com.example.myfirstapp, PID: 786
    09-04 12:24:50.210: E/AndroidRuntime(786): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myfirstapp/com.example.myfirstapp.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2197)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2258)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.app.ActivityThread.access$800(ActivityThre ad.java:138)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1209)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.os.Handler.dispatchMessage(Handler.java:10 2)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.os.Looper.loop(Looper.java:136)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.app.ActivityThread.main(ActivityThread.jav a:5026)
    09-04 12:24:50.210: E/AndroidRuntime(786): at java.lang.reflect.Method.invokeNative(Native Method)
    09-04 12:24:50.210: E/AndroidRuntime(786): at java.lang.reflect.Method.invoke(Method.java:515)
    09-04 12:24:50.210: E/AndroidRuntime(786): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:777)
    09-04 12:24:50.210: E/AndroidRuntime(786): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:602)
    09-04 12:24:50.210: E/AndroidRuntime(786): at dalvik.system.NativeStart.main(Native Method)
    09-04 12:24:50.210: E/AndroidRuntime(786): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
    09-04 12:24:50.210: E/AndroidRuntime(786): at com.android.internal.policy.impl.PhoneWindow.reque stFeature(PhoneWindow.java:275)
    09-04 12:24:50.210: E/AndroidRuntime(786): at com.android.internal.policy.impl.PhoneWindow.gener ateLayout(PhoneWindow.java:2872)
    09-04 12:24:50.210: E/AndroidRuntime(786): at com.android.internal.policy.impl.PhoneWindow.insta llDecor(PhoneWindow.java:3129)
    09-04 12:24:50.210: E/AndroidRuntime(786): at com.android.internal.policy.impl.PhoneWindow.setCo ntentView(PhoneWindow.java:303)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.app.Activity.setContentView(Activity.java: 1930)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.support.v7.app.ActionBarActivity.superSetC ontentView(ActionBarActivity.java:217)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.support.v7.app.ActionBarActivityDelegateIC S.setContentView(ActionBarActivityDelegateICS.java :110)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.support.v7.app.ActionBarActivity.setConten tView(ActionBarActivity.java:77)
    09-04 12:24:50.210: E/AndroidRuntime(786): at com.example.myfirstapp.MainActivity.onCreate(MainA ctivity.java:13)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.app.Activity.performCreate(Activity.java:5 242)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1087)
    09-04 12:24:50.210: E/AndroidRuntime(786): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2161)
    09-04 12:24:50.210: E/AndroidRuntime(786): ... 11 more

  5. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.

    Try Searching the internet for this error:
    You cannot combine swipe dismissal and the action bar.
    If you don't understand my answer, don't ignore it, ask a question.

  6. The Following User Says Thank You to Norm For This Useful Post:

    kickass (September 4th, 2014)

  7. #5
    Junior Member
    Join Date
    Aug 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.

    I searched and found what I need to do.
    Which I think I have to set the target sdk version from 21 to 19.
    But while creating the AVD, in the target setting place! I only find level 20.

  8. #6
    Junior Member
    Join Date
    Aug 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.


  9. #7
    Junior Member
    Join Date
    Aug 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.

    ah I think I have found that problem, haven't installed the packages of other level.
    Thank you so much anyways.
    Will let you know.

  10. #8
    Junior Member
    Join Date
    May 2017
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.

    There are many tutorials among the web for fixing those kind of problems that you can use. Just make sure you do is as quick as possible in order to maintain your code safe. If it's getting a but hard for you, you can try using some programs such as checkamrx or others for code security.
    Good luck with it.
    Ben.

  11. #9
    Member John Joe's Avatar
    Join Date
    Jun 2017
    Posts
    277
    My Mood
    Amused
    Thanks
    8
    Thanked 19 Times in 19 Posts

    Default Re: How to fix problem regarding error message "Installation failed due to invalid URI!" in time of running an android trial application.

    If you have been using Eclipse with ADT, be aware that Android Studio is now the official IDE for Android, so you should migrate to Android Studio to receive all the latest IDE updates.Current projects built in Eclipse should still work well enough, but taking advantage of new Android features will be harder and harder from here on out. Projects can be imported into Android Studio with the File>New>Import Project menu.
    Whatever you are, be a good one

Similar Threads

  1. Why do I get "Build Failed" when running my program in Netbeans
    By theyuv in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 28th, 2014, 12:32 PM
  2. Replies: 2
    Last Post: May 22nd, 2014, 01:17 PM
  3. Replies: 0
    Last Post: December 5th, 2013, 07:49 PM
  4. Replies: 26
    Last Post: February 10th, 2013, 12:59 PM
  5. Replies: 10
    Last Post: October 26th, 2011, 02:22 PM

Tags for this Thread