小编Ran*_*and的帖子

Android java.exe以非零退出值1结束

我试过看类似的,没有解决方案有效.我以前运行的应用程序没有问题,但我的新应用程序突然开始给我带来问题.当我尝试运行它时总是失败说:

Error:Execution failed for task ':app:preDexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.7.0_67\bin\java.exe'' finished with non-zero exit value 1
Run Code Online (Sandbox Code Playgroud)

以下是控制台显示的内容:

Executing tasks: [:app:assembleDebug]

Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportSupportV42200Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:preDexDebug
AGPBI: {"kind":"SIMPLE","text":"Error: Could not create the Java Virtual        Machine.","position":{},"original":"Error: Could not create the …
Run Code Online (Sandbox Code Playgroud)

android jvm compiler-errors gradle

116
推荐指数
9
解决办法
21万
查看次数

Android为最近的应用使用不同的图标

我有一个有效的应用程序,但我想添加一个备用版本的应用程序图标,该图标将与最近的应用程序窗口相关联.最近的应用程序窗口将使用另一个,而不是主屏幕上显示的图标.

icons android android-recents

5
推荐指数
1
解决办法
2856
查看次数

toLeftOf资源未找到

我以前曾经多次使用过LeftOf但它突然停止工作了.我试过了:

android:layout_toLeftOf="@id/spacer"
Run Code Online (Sandbox Code Playgroud)

这是观点:

<View
    android:id="@+id/spacer"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_marginLeft="@dimen/center_margin"
    android:layout_marginStart="@dimen/center_margin"
    android:layout_marginRight="@dimen/center_margin"
    android:layout_marginEnd="@dimen/center_margin" />
Run Code Online (Sandbox Code Playgroud)

它给了我错误:

Error:(16, 34) No resource found that matches the given name (at 'layout_toLeftOf' with value '@id/spacer').
Error:(17, 35) No resource found that matches the given name (at 'layout_toStartOf' with value '@id/spacer').
Run Code Online (Sandbox Code Playgroud)

它适用于应用程序中的其他点,但由于某种原因它在这里不起作用.谁知道什么是错的?

编辑 - 是的,它位于RelativeLayout中.这是一个浓缩版本:

<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:screenOrientation="portrait"
android:fitsSystemWindows="true"
android:focusableInTouchMode="true" >

<TextView
    android:id="@+id/txt1" />

<View
    android:id="@+id/spacer" />

<TextView
    android:id="@+id/txt2" />

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

xml android android-layout

3
推荐指数
1
解决办法
2796
查看次数