Java – Installation failed due to invalid URI
[2013-07-21 11:14:01 - AndroidTrial] Installation Failed due to invalid URI!
[2013-07-21 11:14:01 - AndroidTrial] Installation Failed due to invalid URI! [2013-07-21 11:14:01 - AndroidTrial] Please check logcat output for more details. [2013-07-21 11:14:02 - AndroidTrial] Launch canceled!
This is the result of my attempt to run the pilot project There is no output in logcat I checked the answers to other similar questions on so. They said it might be because of accented characters I don't have these
This is my simple code:
public class HaikuDisplay extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public void onTrialButtonClicked(View view){ TextView v = (TextView) findViewById(R.id.text); v.setVisibility(View.VISIBLE); } }
This is 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=".HaikuDisplay" > <Button android:id="@+id/topBtn" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/love_button_text" android:onClick="onTrialButtonClicked" /> <TextView android:layout_below="@id/topBtn" android:id="@+id/text" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/hello_world" android:visibility="invisible"/> </RelativeLayout>
How can I solve it?
Solution
This error can point to many different things, and there are many different fixes Summarize what I collected:
>Eclipse issues: clean up projects, rebuild projects, restart eclipses. > Invalid characters: remove any special characters from the eclipse project name Use only [A-Z] and [0-9] and not even [] (spaces) > include errors in jars: try not to use jars and see if it works, if it does fix it in some way. > Error in manifest package settings: right click eclipse – > Android tools – > rename application package in the project (rename to something similar, you can always rename). > Device problem: remove the application from the device and try to reinstall. > ROM problem: if you try to refresh to a new ROM using a custom Rom. > debugging not enabled: on your phone go to settings – > applications – > allow unknown source / enable debugging (this path varies from device to device)