安装由于无效的URI失败 [英] Installation failed due to an invalid URI

查看:143
本文介绍了安装由于无效的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!  

这是我所得到的,当我尝试运行一个试验项目。有在logcat中没有输出。
我看了看类似的问题上,以便其他的答案,他们说,这可能是因为重音的字符。我没有任何这些。

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.

下面是我简单的code是这样的:

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);
    }

}  

这里是XML:

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>  

我该如何解决?

推荐答案

此错误可以指向这么多不同的东西,有很多不同的修复。总之这些我收集了:

This error can point to so many different things, and there is many different fixes. To sum those I've gathered:

  1. 的问题与Eclipse:清洁工程,改造项目,重新启动 日食。
  2. 无效字符:删除Eclipse中的项目名称中的任何特殊字符。 只有使用[AZ]和[0-9]甚至没有[](空格)
  3. 错误的罐子包括:尝试不罐子,看它是否运行,如果不以某种方式固定
  4. 清单中包安装程序错误:右键单击在Eclipse项目 - > Android的工具 - > 重命名的应用程序包(重命名为类似的东西,你可以随时改回)。
  5. 与设备问题:从设备中删除应用程序,并尝试重新安装
  6. 罗的问题:如果您使用自定义ROM尝试重新刷到一个新的ROM
  7. 调试未启用:在手机上进入设置 - > 应用程序 - > 允许来源不明/启用调试(这个路径可以不同为不同的设备)
  1. Problems with Eclipse: Clean project, rebuild project, restart eclipse.
  2. Invalid characters: Remove any special characters in Eclipse project name. Use only [a-z] and [0-9] not even [ ] (whitespace)
  3. Error in included jar: Try without jar and see if it runs, if does fix somehow.
  4. 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).
  5. Problems with device: Remove app from device and try re install.
  6. Rom issue: If you use custom ROM try to reflash to a new ROM.
  7. Debugging not enabled: On phone go to Settings -> Applications -> Allow unknown sources/enable debugging (this path can vary for different devices)

这篇关于安装由于无效的URI失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆