找不到符号,而是构建和Android上的Studio中运行正常 [英] Symbol not found, but Builds and Run OK on Android Studio

查看:476
本文介绍了找不到符号,而是构建和Android上的Studio中运行正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Android Studio中一个奇怪的问题。它不查找到谷歌播放服务的库符号引用,你可以在图片中看到:

I have a strange issue with Android Studio. It doesn't find the symbol references to the Google Play Services libs, as you can see in the picture:

我的的build.gradle 文件看起来像这样:

My build.gradle file is looking like this:

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 8
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:19.0.0'
    compile 'com.android.support:support-v4:19.0.+'
    compile 'com.google.android.gms:play-services:4.1.32'
}

但奇怪的是,我可以构建和运行,甚至在我的手机没有问题的应用程序。
这个问题使得IDE这样的记事本有用的,当我想使用 com.google.android.gms。* 库。我怎样才能解决这个问题呢?

The strange thing, is that I can build and even Run the application in my phone with no problem. This problem makes the IDE so useful as the notepad, when I want to use the com.google.android.gms.* library. How can I solve this issue?

我使用的是版本0.4.2

I'm using version 0.4.2

推荐答案

请在此看看

<一个href=\"http://stackoverflow.com/questions/21081598/import-google-play-services-library-in-android-studio/21086904#21086904\">Import谷歌Play服务库Android Studio中

另一个解决方法是:

<一个href=\"http://stackoverflow.com/questions/21100688/android-studio-0-4-2-suddenly-cannot-resolve-symbols/21100896#21100896\">Android工作室0.4.2突然不能解析符号

这是Android Studio中0.4.2的问题,这是在最新版本0.4.3解决了,我建议您更新的Andr​​oid工作室。

It was an issue in Android Studio 0.4.2 which is resolved in latest release 0.4.3, I recommend you to update your Android Studio.

这篇关于找不到符号,而是构建和Android上的Studio中运行正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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