尝试构建Android时发现以下错误。 iOS调试和发布都没问题。
All input files are considered out-of-date for incremental task ':compileReleaseJavaWithJavac'.
Compiling with source level 1.7 and target level 1.7.
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
file or directory '/tmp/build6717517675623000166xxx/MainUI/src/release/java', not found
Compiling with JDK Java compiler API.
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:40: error: package com.google.android.gms.auth.api does not exist
import com.google.android.gms.auth.api.Auth;
^
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:41: error: package com.google.android.gms.auth.api.signin does not exist
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
^
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:42: error: package com.google.android.gms.auth.api.signin does not exist
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
^
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:43: error: package com.google.android.gms.auth.api.signin does not exist
import com.google.android.gms.auth.api.signin.GoogleSignInResult;
^
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:99: error: package Auth does not exist
Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(client);
^
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:106: error: cannot find symbol
final GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
^
symbol: class GoogleSignInResult
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:106: error: package Auth does not exist
final GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
^
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:110: error: cannot find symbol
GoogleSignInAccount acct = result.getSignInAccount();
^
symbol: class GoogleSignInAccount
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:228: error: cannot find symbol
GoogleSignInOptions gso;
^
symbol: class GoogleSignInOptions
location: class GoogleImpl
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:232: error: package GoogleSignInOptions does not exist
gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
^
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:232: error: cannot find symbol
gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
^
symbol: variable GoogleSignInOptions
location: class GoogleImpl
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:241: error: package GoogleSignInOptions does not exist
gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN).build();
^
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:241: error: cannot find symbol
gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN).build();
^
symbol: variable GoogleSignInOptions
location: class GoogleImpl
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:246: error: cannot find symbol
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
^
symbol: variable Auth
location: class GoogleImpl
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:260: error: cannot find symbol
mGoogleApiClient.connect(GoogleApiClient.SIGN_IN_MODE_OPTIONAL);
^
symbol: variable SIGN_IN_MODE_OPTIONAL
location: interface GoogleApiClient
/tmp/build6717517675623000166xxx/MainUI/src/main/java/com/codename1/social/GoogleImpl.java:275: error: package Auth does not exist
Auth.GoogleSignInApi.signOut(client).setResultCallback(
我也可以在调试器中运行它。
我需要使用GoogleLogin,但我不知道导致此错误的原因。
有什么想法吗?
答案 0 :(得分:2)
我有同样的问题,我通过删除android.includeGPlayServices构建提示修复它
答案 1 :(得分:1)
由于Google实际上已弃用Google+登录信息,因此我们不得不重做整个signin with Google
流程。这在开发人员指南部分中有关使用Google登录的说明,现在已经重写并且实际上要简单得多。
为了清楚起见,我们没有选择...... Google停止了工作,因为谷歌停止了对它的支持。
我们在blog post中讨论了其中一些变化。