当我在Android Studio中的任何文件夹中创建一个新项目时,除了我目前有项目的文件夹之外,我在MainActivity.java
中收到错误。以下是班级......
package com.example.david.dynamicuifragments;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
我创建了多个项目,清理构建,重建,使用gradle文件同步项目。这没有什么补救措施。请帮忙
错误消息是: 错误:无法处理文件C:\ Users \ David \ OneDrive \ Development \ MyAndroidStudio \ AndroidDevelopersTraining \ DynamicUIFragments \ app \ build \ intermediates \ explosion-aar \ com.android.support \ appcompat-v7 \ 25.1.0 \ res \ drawable -xxhdpi-v4 \ abc_text_select_handle_middle_mtrl_light.png到C:\ Users \ David \ OneDrive \ Development \ MyAndroidStudio \ AndroidDevelopersTraining \ DynamicUIFragments \ app \ build \ intermediates \ res \ merged \ debug \ drawable-xxhdpi-v4 \ abc_text_select_handle_middle_mtrl_light.png
错误:任务':app:mergeDebugResources'执行失败。
错误:无法处理文件C:\ Users \ David \ OneDrive \ Development \ MyAndroidStudio \ AndroidDevelopersTraining \ DynamicUIFragments \ app \ build \ intermediates \ explosion-aar \ com.android.support \ appcompat-v7 \ 25.1.0 \ res \ drawable-xxhdpi-v4 \ abc_text_select_handle_middle_mtrl_light.png到C:\ Users \ David \ OneDrive \ Development \ MyAndroidStudio \ AndroidDevelopersTraining \ DynamicUIFragments \ app \ build \ intermediates \ res \ merged \ debug \ drawable-xxhdpi-v4 \ abc_text_select_handle_middle_mtrl_light.png
答案 0 :(得分:0)
请尝试以下步骤:
告诉我这是否有效。
答案 1 :(得分:0)
我遇到了类似的问题。在build.gradle(项目)文件中,找到依赖项部分并尝试将其更新为gradle工具的最新beta版。
classpath 'com.android.tools.build:gradle:2.3.0-beta1'