小编Ank*_*94a的帖子

完成非零退出值

我正在尝试导入我的项目.但是当我运行应用程序时,我收到以下错误:

Error: Execution failed for task ':app:processDebugResources'.
 > com.android.ide.common.process.ProcessException:      
   org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Vishnu  Ruhela\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non- zero exit value 1
Run Code Online (Sandbox Code Playgroud)

这是我的gradle文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"
    defaultConfig {
        applicationId "com.example.vishnuruhela.signup"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors { }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile project(':listView1')
}
Run Code Online (Sandbox Code Playgroud)

android android-gradle-plugin

163
推荐指数
9
解决办法
27万
查看次数

谷歌与联系人API的People API

在尝试使用用户的Google帐户获取联系人时,我在使用人员API后面临一些问题.它只返回所有列出的几个电子邮件地址.访问令牌和所有范围都已正确设置.以下代码:

People peopleService = new People.Builder(httpTransport, jsonFactory, credential)
                    .build();
ListConnectionsResponse response = peopleService.people().connections().list("people/me")
                    .setPageSize(500).setSortOrder("FIRST_NAME_ASCENDING")
                    .setAccessToken(tokenResponse.getAccessToken())
                    .setAlt("json")
                    .setRequestMaskIncludeField("person.names,person.emailAddresses,person.phoneNumbers")
                    . execute();
   connections = response.getConnections();
Run Code Online (Sandbox Code Playgroud)

如果我使用谷歌的联系API,那么我将获得更多的电子邮件地址而不是人们.联系API的代码:

URL feedUrl = new URL("https://www.google.com/m8/feeds/contacts/default/full");
    ContactFeed resultFeed = myService.getFeed(feedUrl, ContactFeed.class);

    // Print the results
    System.out.println(resultFeed.getTitle().getPlainText());
    for (ContactEntry entry : resultFeed.getEntries()) {
          ....
          .....
          .......
 }
Run Code Online (Sandbox Code Playgroud)

我想知道他们两者之间是否有任何差异,我必须使用哪一个以获得更好的结果,或者我错过了什么.请建议.谢谢..!!

android google-contacts-api android-contacts google-people

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