0

I have setup everything right, I don't know whats the problem is and I googled it a hundred time.

The error :

04-24 04:40:52.266 770-1829/com.google.android.gms E/PopupManager: No content view usable to display popups. Popups will not be displayed in response to this client's calls. Use setViewForPopups() to set your content view.
04-24 04:40:52.270 770-1829/com.google.android.gms E/ValidateServiceOp: Using Google Play games services requires a metadata tag with the name "com.google.android.gms.games.APP_ID" in the application tag of the manifest for com.halafann.realhunter.realhunter
04-24 04:40:52.274 1712-1712/com.halafann.realhunter.realhunter E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                  java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information.
                                                                                      at com.google.android.gms.internal.eh$h.b(Unknown Source)
                                                                                      at com.google.android.gms.internal.eh$h.a(Unknown Source)
                                                                                      at com.google.android.gms.internal.eh$b.ec(Unknown Source)
                                                                                      at com.google.android.gms.internal.eh$a.handleMessage(Unknown Source)
                                                                                      at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                      at android.os.Looper.loop(Looper.java:137)
                                                                                      at android.app.ActivityThread.main(ActivityThread.java:4745)
                                                                                      at java.lang.reflect.Method.invokeNative(Native Method)
                                                                                      at java.lang.reflect.Method.invoke(Method.java:511)
                                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
                                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
                                                                                      at dalvik.system.NativeStart.main(Native Method)

The Activity as you can see here nothing wrong with it unless i miss something:

public class GameHomeFragment extends BaseGameActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_home2);

        findViewById(R.id.sign_in_button).setOnClickListener(this);
        findViewById(R.id.sign_out_button).setOnClickListener(this);

    }


//////////GOOGLE

    private boolean isNetworkAvailable() {
        ConnectivityManager connectivityManager
                = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
        return activeNetworkInfo != null && activeNetworkInfo.isConnected();
    }

    public void onSignInSucceeded() {
        findViewById(R.id.sign_in_button).setVisibility(View.GONE);
        findViewById(R.id.sign_out_button).setVisibility(View.VISIBLE);
    }

    @Override
    public void onSignInFailed() {
        findViewById(R.id.sign_in_button).setVisibility(View.VISIBLE);
        findViewById(R.id.sign_out_button).setVisibility(View.GONE);
    }

    @Override
    public void onClick(View view) {
        if (view.getId() == R.id.sign_in_button) {
            if (isNetworkAvailable()) {
                beginUserInitiatedSignIn();
            } else {
                Toast.makeText(GameHomeFragment.this, getResources().getString(R.string.home_internet_unavailable), Toast.LENGTH_LONG).show();
            }

        }
        else if (view.getId() == R.id.sign_out_button) {
            signOut();
            findViewById(R.id.sign_in_button).setVisibility(View.VISIBLE);
            findViewById(R.id.sign_out_button).setVisibility(View.GONE);
        }
    }

}

The Layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="@dimen/default_padding">

    <!-- 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" />

    <!-- sign-out button -->

    <Button
        android:id="@+id/sign_out_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Sign Out"
        android:visibility="gone" />

            <TextView
                android:id="@+id/google_signin_info"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/home_sign_info"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="@color/text_view_grey" />

    </LinearLayout>

AndroidManifists:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.halafann.realhunter.realhunter">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:replace="android:label, android:icon">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".game.fragments.GameHomeFragment"></activity>


        <!-- Google Game Service -->
        <meta-data
            android:name="com.google.android.gms.games.APP_ID"
            android:value="@string/app_id" />
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

    </application>

</manifest>

Build.Gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    repositories {
        mavenCentral()
    }

    defaultConfig {
        applicationId "com.halafann.realhunter.realhunter"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:recyclerview-v7:23.1.1'
    compile 'com.android.support:cardview-v7:21.0.0'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile ('com.github.florent37:materialviewpager:1.1.3@aar'){
        transitive = true
    }
    compile 'com.google.android.gms:play-services:4.3.23+'
    compile 'com.github.florent37:hollyviewpager:1.0.1'
    compile 'com.github.ksoichiro:android-observablescrollview'
    compile 'cn.pedant.sweetalert:library:1.3'

    compile project(':BaseGameUtils')
}
LoicTheAztec
  • 184,753
  • 20
  • 224
  • 275
T3lemi
  • 23
  • 4
  • 1
    Maybe it's that you've got a different package name in the manifest. I'm not sure exactly how the Google components access that tag, but you've got `com.hello.me` in the manifest. – Mike M. Apr 24 '16 at 05:00
  • No, i just edit it and it's as u see now. all good but still same error :( – T3lemi Apr 24 '16 at 05:35
  • You might try cleaning/rebuilding your project, especially if you've added those tags after having compiled and run once. – Mike M. Apr 24 '16 at 05:37
  • i did clean, Rebuild, clear all cache from android studio restarted it tried it on real phone and the same issue :( – T3lemi Apr 24 '16 at 06:07
  • You night have a look through [this page](https://developers.google.com/games/services/android/troubleshooting) to make sure you've not missed anything. – Mike M. Apr 24 '16 at 06:12
  • @MikeM. i just did and everything seems fine 100% – T3lemi Apr 24 '16 at 06:23
  • Possible duplicate of [Initializing Games Client in Android](http://stackoverflow.com/questions/16595225/initializing-games-client-in-android) – AL. Apr 25 '16 at 04:17
  • @sept Thank You but No, i already tried that answer.
    and i tried to build new app using eclipse to and same error i don't know is it me or what :(
    – T3lemi Apr 25 '16 at 04:36
  • Have you also seen these: http://stackoverflow.com/a/35258925/6124253, http://stackoverflow.com/q/35653806/6124253, http://stackoverflow.com/a/27770829/6124253, http://stackoverflow.com/a/34635174/6124253 ? – AL. Apr 25 '16 at 05:05
  • @sept Yes, and i also checked this [h e r e](http://code.tutsplus.com/tutorials/google-play-game-services-leaderboards--cms-20700) – T3lemi Apr 25 '16 at 05:12

1 Answers1

-1

Move your metadata tags before the activity tag. It resolved the problem for me. I had exactly the same issue.