小编use*_*530的帖子

错误:在 Android Studio 中找不到符号类

我在构建项目时遇到了重大问题。

我的项目正在 Android Studio 中构建,目录如下:

root
-project
--build
--libs
--src
---java
----com
-----company.project
------<All this projects source>
-projectutils
--build
--src
---main
----java
-----com.company.utils
------<All this projects source>
Run Code Online (Sandbox Code Playgroud)

“project”是主应用程序,它包含projectutils作为依赖项。它使用 Gradle 进行构建,我已将正确的包含添加到根 settings.gradle 中,并将正确的依赖项添加到项目中。

这是我的项目根目录中的settings.gradle:

include ':project', ':projectutils'
Run Code Online (Sandbox Code Playgroud)

这是我的项目的 build.gradle:

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion '20.0.0'
    defaultConfig {
        applicationId 'com.company.project'
        minSdkVersion 15
        targetSdkVersion 17
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile files('libs/android-support-v4.jar')
    compile files('libs/commons-validator-1.4.0.jar')
    compile …
Run Code Online (Sandbox Code Playgroud)

java android android-studio

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

标签 统计

android ×1

android-studio ×1

java ×1