有很多这样的问题,但它不是重复的
因为我已经使用过 xmlns:ads="http://schemas.android.com/apk/res-auto" 并且我主要用 Java 编写代码
我想使用谷歌播放服务来投放广告
我使用了下面的java代码
    com.google.android.gms.ads.AdView adView = (com.google.android.gms.ads.AdView) activity.findViewById(R.id.adview);
    adView.setAdSize(AdSize.SMART_BANNER);
    adView.setAdUnitId(activity.getString(R.string.admob_id));
    AdRequest adRequest = new AdRequest.Builder().build();
    adView.loadAd(adRequest);
Run Code Online (Sandbox Code Playgroud)
并遵循xml代码
 <com.google.android.gms.ads.AdView
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    android:id="@+id/adview"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
     />
Run Code Online (Sandbox Code Playgroud)
但我在横幅中遇到错误就像
缺少必需的 XML 属性“adsize”
public class Helpers  extends Activity implements
    GoogleApiClient.ConnectionCallbacks,
    GoogleApiClient.OnConnectionFailedListener {
SharedPreferences preferences;
private static final String TAG = "BaseDriveActivity";
public static  String EXISTING_FOLDER_ID;
protected static final int REQUEST_CODE_RESOLUTION = 1;
protected static final int NEXT_AVAILABLE_REQUEST_CODE = 2;
public static final String folderId = "FOLDER_ID";
public static final String fileName = "folderId";
private GoogleApiClient mGoogleApiClient;
@Override
protected void onResume() {
    super.onResume();
    if (mGoogleApiClient == null) {
        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addApi(Drive.API)
                .addScope(Drive.SCOPE_FILE)
                .addScope(Drive.SCOPE_APPFOLDER) // required for App Folder sample
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .build(); …Run Code Online (Sandbox Code Playgroud) android google-drive-api google-play-services google-drive-android-api
错误:(51)评估项目':app'时出现问题.
无法在项目':app'上找到参数[com.google.android.gms:play-services-gcm:7.5.0]的方法complie().
如何解决这个错误?
请查看build.gradle文件
buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
    maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'com.google.gms.google-services'
android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    defaultConfig {
        applicationId "XYZ"
        minSdkVersion 14
        targetSdkVersion 22
        versionCode 13
        versionName "3.0.1"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.squareup.okio:okio:1.4.0'
    compile …Run Code Online (Sandbox Code Playgroud) 我正在尝试按照Google的指示在以下网址导入Google Play游戏服务:https: //developers.google.com/games/services/training/signin
<!-- sign-in button -->
<com.google.android.gms.common.SignInButton
 android:id="@+id/sign_in_button"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content" />
Run Code Online (Sandbox Code Playgroud)
当我导入官方的Google Play按钮(如上面XML布局所示)时,我在日志中收到此错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{flash4life.gespant2015.com.flashreflex20/flash4life.gespant2015.com.flashreflex20.MainActivity}: java.lang.ClassCastException: com.google.android.gms.common.SignInButton cannot be cast to android.widget.Button
                                                                                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3255)
Run Code Online (Sandbox Code Playgroud)
这是整个错误日志:
08-15 19:57:25.961 472-472/flash4life.gespant2015.com.flashreflex20 E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                  Process: flash4life.gespant2015.com.flashreflex20, PID: 472
                                                                                  java.lang.RuntimeException: Unable to start activity ComponentInfo{flash4life.gespant2015.com.flashreflex20/flash4life.gespant2015.com.flashreflex20.MainActivity}: java.lang.ClassCastException: com.google.android.gms.common.SignInButton cannot be cast to android.widget.Button
                                                                                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3255)
                                                                                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3351)
                                                                                      at android.app.ActivityThread.access$1100(ActivityThread.java:222)
                                                                                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1796)
                                                                                      at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                      at android.os.Looper.loop(Looper.java:158)
                                                                                      at android.app.ActivityThread.main(ActivityThread.java:7230)
                                                                                      at java.lang.reflect.Method.invoke(Native Method)
                                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
                                                                                   Caused …Run Code Online (Sandbox Code Playgroud) 在我的Android应用程序中使用谷歌地图活动时,我收到此错误.
"无法解析com.google.android.gms:play-services:11.8.0."
项目级 Gradle文件:
buildscript {
repositories {
    jcenter()
    google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}
allprojects {
    repositories {
        jcenter()
        google()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
应用程序级 Gradle文件:
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.google.android.gms:play-services:11.8.0'
}
Run Code Online (Sandbox Code Playgroud) android google-maps google-play-services build.gradle android-gradle-plugin
我想通过以下链接使用Xamarin的Google Play服务定位服务:
https://docs.microsoft.com/en-us/xamarin/android/platform/maps-and-location/location
IsGooglePlayServicesInstalled函数返回true,并安装了Xamarin.GooglePlayServices.Maps.
我究竟做错了什么?
android google-api xamarin google-play-services google-location-services
我正在为一个版本集成Firebase消息:
'com.google.firebase:firebase-messaging:15.0.2' 
Run Code Online (Sandbox Code Playgroud)
我的类路径是: -
classpath 'com.google.gms:google-services:3.2.0'
Run Code Online (Sandbox Code Playgroud)
我有Faced跟随错误: -
无法解决:firebase-messaging打开文件
android firebase google-play-services android-studio firebase-cloud-messaging
目前正在努力从 中读取用户短信Telephony.Sms.Inbox,获取优惠相关的短信和类别,然后以正确的方式向用户展示以使用优惠。
最近 Google 宣布他们在 Google Play 中对保护用户进行了一些更改。在博客中,他们说将来仅通过应用程序作为默认短信应用程序完全访问读取用户短信。甚至用户允许阅读短信的权限。
为了为我们的用户提供安全可靠的体验,我们进行了这些更改。
我的问题是
更新
我在 Unity 2018.2.15f1 上使用 google play games Unity3D api,应该注意的是,我的 google play games 项目尚未发布,但是我不想在我获得所有成就之前发布它。
排行榜发帖代码为:
public void PostScore(long score)
{
    Social.ReportScore(score, GPGSIds.leaderboard_high_scores, (bool success) => {
    // handle success or failure
        if(success)
        {
            Debug.Log("Posted Score of " + score);
        }
        else
        {
            Debug.Log("Failed to post score");
        }
    });
}
Run Code Online (Sandbox Code Playgroud)
并且 logcat 始终显示这返回成功,如下所示:
11-16 02:45:05.041: I/Unity(5503): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
11-16 02:45:05.042: I/Unity(5503): Posted Score of 19
Run Code Online (Sandbox Code Playgroud)
然而,无论排行榜没有更新,它始终显示 8 分。我不明白为什么会出现这个,因为它只出现在我的设备上,即使我擦除排行榜它仍然存在。
排行榜尚未发布的事实是否存在问题?或者可能有其他东西在起作用。
我最近向 Play 商店提交了一个应用程序。该应用程序被拒绝,我不知道如何修复它。错误很明显,但不是解决方案。
\n\n问题:违反权限政策审核您的应用后,我们发现它\xe2\x80\x99 不符合使用所请求权限的条件,原因如下:\n根据我们的审核,我们发现您的应用\xe2\x80 \x99s 表示的用户体验与您声明的核心功能{默认电话处理程序(以及默认处理程序时的任何其他核心功能使用)}不匹配。请从您的应用中删除这些权限。\n您的声明表单上列出了默认处理程序功能,但您的应用似乎不具有默认处理程序功能。请提交修改后的申报表。
\n\n我发现 Google Play 商店的用户界面让我很困惑。他们没有回复任何电子邮件,我不知道该怎么办。
\n\n<uses-permission android:name="android.permission.GET_ACCOUNTS" />\n<uses-permission android:name="android.permission.READ_PROFILE" />\n<uses-permission android:name="android.permission.READ_CONTACTS" />\n<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />\n<uses-permission android:name="android.permission.READ_CALL_LOG" />\n<uses-permission android:name="android.permission.WRITE_CALL_LOG" />\n<uses-permission android:name="android.permission.INTERNET" />\n<uses-permission android:name="android.permission.READ_PHONE_STATE" />\nRun Code Online (Sandbox Code Playgroud)\n 我在项目 gradle 中使用此版本没有错误:
classpath 'com.google.gms:google-services:4.3.5'
Run Code Online (Sandbox Code Playgroud)
但是当我更改为4.3.7 时:
Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources:
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for …Run Code Online (Sandbox Code Playgroud) 为什么我们需要设置开/关GPS,另一方面我们可以通过编程方式打开/关闭WIFI和蓝牙而无需移动设置.Android指南已更改为4.0以上版本.对于4.0以上的版本,您无法以编程方式更改GPS.
gps android android-intent android-location google-play-services
android ×11
admob ×1
build.gradle ×1
c# ×1
firebase ×1
google-api ×1
google-maps ×1
gps ×1
widget ×1
xamarin ×1