Installation failed due to an invalid URI
android, eclipse, java
Solution
This error can point to so many different things, and there is many different fixes. To sum those I've gathered:
- Problems with Eclipse: Clean project, rebuild project, restart eclipse.
- Invalid characters: Remove any special characters in Eclipse project name. Use only [a-z] and [0-9] not even [ ] (whitespace)
- Error in included jar: Try without jar and see if it runs, if does fix somehow.
- Errors in manifest package setup: Right click in eclipse on project -> `Android tools` -> `Rename application package` (rename to something similar, you can always rename back).
- Problems with device: Remove app from device and try re install.
- Rom issue: If you use custom ROM try to reflash to a new ROM.
- Debugging not enabled: On phone go to `Settings` -> `Applications` -> `Allow unknown sources/enable debugging` (this path can vary for different devices)
Problem
``` [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 what I get when I try to run a trial project. There is no output in the logcat. I looked at other answer on SO for similar problems and they say that it can be because of accented characters. I do not have any of those. Here is what my simple code looks like: ``` 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); } } ``` And here is 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=".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 do I solve that?