GooglePlusUtil cannot be resolved (Android) - android

I have an Android 2.2 targeted library project, whose MyLibraryGooglePlusSocialPlugin.java has a import com.google.android.gms.plus.GooglePlusUtil; being failed to compile (GooglePlusUtil cannot be resolved), while others are okay:
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesClient;
import com.google.android.gms.common.Scopes;
import com.google.android.gms.plus.PlusClient;
import com.google.android.gms.plus.PlusClient.OnPeopleLoadedListener;
import com.google.android.gms.plus.PlusClient.OnPersonLoadedListener;
import com.google.android.gms.plus.PlusShare;
import com.google.android.gms.plus.model.people.Person;
import com.google.android.gms.plus.model.people.PersonBuffer;
I've updated the related Google services through Android SDK manager today, and set the build path and dependencies.

The GooglePlusUtils class has been removed because you no longer need it. All of the existing error handling functionality has been integrated in a way that doesn't require developer intervention.
As an example of how you can migrate from using this (now deprecated) class, see the following change from the Google+ Photohunt Android client sample that resolves the issue:
https://github.com/gguuss/gplus-photohunt-client-android/commit/090c22b4721fde6859361aca210823822c218da8

I work it around by downgrading to a previous version where the AndroidManifest.xml in the google-play-services_lib goes like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms"
android:versionCode="3159130"
android:versionName="3.1.59 (744626-30)" >
<uses-sdk android:minSdkVersion="8"/>
</manifest>
UPDATE
I downgrade the library by reloading a lower version that was saved in my local disk. No idea how to downgrade through Android SDK manager.

Their documentation has not changed online, but it is indeed missing form the jar. I would look for a copy of the last version and use it for the time being.
** UPDATE **
You can do the same things with the GooglePlayServicesUtil and checking to see if they user has the correct package name for Google Plus.

The old GooglePlusUtil + error codes are not needed now, because even if the device has not installed GooglePlus application, GooglePlay services provides connection to user account. You can only check if GooglePlay services is present and updated using GooglePlayServicesUtil.isGooglePlayServicesAvailable and hide UI field with GooglePlus. In other case connection to user (GooglePlus) account will be made.

Related

how to import java.nio.file in android

I'm confused.Why okio cannot find this package in IDE and android cannot use this packgae based on 'How to use java.nio.file package in android?', but okio still works? How can I do this like okio?

Using Arcanimator in android app

Hi i want to use ArcAnimator and ArcLayout in one android project .
for that i using this dependencys
compile 'com.ogaclejapan.arclayout:library:1.0.1#aar'
compile 'com.github.asyl.animation:arcanimator:1.0.0'
but i give this error message
cannot resolve symbol'SupportAnimator'
cannot resolve symbol'ViewAnimationUtils'
in import line
import io.codetail.animation.SupportAnimator;
import io.codetail.animation.ViewAnimationUtils;
and its strange because i do not give this error in this lines
import io.codetail.animation.arcanimator.ArcAnimator;
import io.codetail.animation.arcanimator.Side;
which is in same library.
can anyone help me about that?
You have to use other dependency to use Support Animator say https://github.com/kedzie/Support_v4_NineOldAndroids. Support Animator is not there in the package of the library that you have used. It’s not showing inside the package you have used, you can check at https://github.com/asyl/ArcAnimator/tree/master/animator/src/main/java/io/codetail/animation/arcanimator.
Also you can take help of some samples given here at https://github.com/ozodrukh/CircularReveal/releases.

Cannot find Log class in Android

I am developing an app in Android Studio with target for API 22. I have tried to use the Log class with the method d() but I did not find it. The helper shows only Log()...
What am I missing?
Just import the library import android.util.Log;
And just tips: use alt+space and alt+enter feature from Android Studio
Note:
Alt + Enter = Project quick fix (show intention actions and quick fixes)

IBM Worklight - How do I enable WebView debugging in Android?

Since Chrome has an awesome feature for remote debugging,
I am wondering how this could help in developing in Worklight.
In the following docs they say to debug the contents of your WebView, you need to enable it programmatically from within your application by calling setWebContentsDebuggingEnabled, a static method on the WebView class.
Where can I find this class and will this be beneficial to do it in Worklight?
https://developers.google.com/chrome-developer-tools/docs/remote-debugging?hl=nl#debugging-webviews
Please note that WebView debugging is only relevant for Android 4.4 "KitKat" and not to any prior version of the Android OS.
To debug your Chromium WebView in a Worklight application with the Android environment,
Open the Android SDK and update to API Level 19.
You will of course need either a device or emulator running this version.
Make sure that in yourAppName\android\native\AndroidManifest.xml you add support for targetSdkVersion=19.
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
Change the Build Target to Android 4.4:
Right-click on the generated Android project > Properties > Android > Build Target
Open yourAppName\android\native\src\com\yourAppName\yourAppName.java and
Import the following:
import android.os.Build;
import android.util.Log;
import android.content.pm.ApplicationInfo;
import android.webkit.WebView;
Add the following to the onCreate() function:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
if(0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)){
WebView.setWebContentsDebuggingEnabled(true);
}
}
The rest of the steps are as described in the Google documentation page.
I don't have an Android device to verify this, so please try.
As for whether it is beneficial or not, another debugging alternative can't hurt. It is up to you to decide if it's good or not, for you.

android import error

I am trying use the GPE code for App-Android Android-App communication. Both the two new created folders (Android, AppEngine) have errors. I think the problem is that there are
errors with the packages:
import com.google.web.bindery.requestfactory.shared.InstanceRequest;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.ServiceName;
It says "The import com.google.web cannot be resolved." I tried adding everything able to be checked checked in the build path. I also know I installed the Web Toolkit and everything. What is wrong?
Statements like the following also have error markings:
#ProxyForName(value = "com.glm.server.Message",
locator = "com.glm.server.MessageLocator") and actually there are so many errors it must be the imports.

Categories

Resources