[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:
的问题与Eclipse:清洁工程,改造项目,重新启动 日食。 无效字符:删除Eclipse中的项目名称中的任何特殊字符。 只有使用[AZ]和[0-9]甚至没有[](空格) 错误的罐子包括:尝试不罐子,看它是否运行,如果不以某种方式固定 清单中包安装程序错误:右键单击在Eclipse项目 - > Android的工具
- > 重命名的应用程序包
(重命名为类似的东西,你可以随时改回)。
与设备问题:从设备中删除应用程序,并尝试重新安装
罗的问题:如果您使用自定义ROM尝试重新刷到一个新的ROM
调试未启用:在手机上进入设置
- > 应用程序
- > 允许来源不明/启用调试
(这个路径可以不同为不同的设备)
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)