Toxic Tom
Member
Hi all, I have a project created in GMS2 v2.1.5.322 which was building for Android successfully. Today I updated to GMS2 v2.2.5.481 and cannot build for Android.
I have followed the instructions described in this article: https://help.yoyogames.com/hc/en-us/articles/115001368727-Setting-Up-For-Android-or-Amazon-Fire
There are several errors displayed on the output including "error: package android.support.annotation does not exist" which I have included below (only the end part of the output is included):
Does anyone have any suggestions on how I can get the Android build working again?
Thanks,
Tom
I have followed the instructions described in this article: https://help.yoyogames.com/hc/en-us/articles/115001368727-Setting-Up-For-Android-or-Amazon-Fire
There are several errors displayed on the output including "error: package android.support.annotation does not exist" which I have included below (only the end part of the output is included):
Code:
C:\Windows\system32\cmd.exe /c "subst Q: "Z:/Block_Boi_95BA42C5\Android\default" && Q: && cd "com.toxictom.blockboi" && "X:/Android\runner\gradle\gradlew" build assembleRelease -x lint "
> Configure project :com.toxictom.blockboi
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
> Task :com.toxictom.blockboi:preBuild UP-TO-DATE
> Task :com.toxictom.blockboi:preDebugBuild
> Task :com.toxictom.blockboi:compileDebugAidl NO-SOURCE
> Task :com.toxictom.blockboi:checkDebugManifest
> Task :com.toxictom.blockboi:compileDebugRenderscript NO-SOURCE
> Task :com.toxictom.blockboi:generateDebugBuildConfig
> Task :com.toxictom.blockboi:prepareLintJar
> Task :com.toxictom.blockboi:generateDebugSources
> Task :com.toxictom.blockboi:javaPreCompileDebug
> Task :com.toxictom.blockboi:mainApkListPersistenceDebug
> Task :com.toxictom.blockboi:generateDebugResValues
> Task :com.toxictom.blockboi:generateDebugResources
> Task :com.toxictom.blockboi:mergeDebugResources
> Task :com.toxictom.blockboi:createDebugCompatibleScreenManifests
> Task :com.toxictom.blockboi:processDebugManifest
Q:\com.toxictom.blockboi\src\main\AndroidManifest.xml:30:3-86:17 Warning:
application@android:label was tagged at AndroidManifest.xml:30 to replace other declarations but no other declaration present
Q:\com.toxictom.blockboi\src\main\AndroidManifest.xml:31:5-40:16 Warning:
activity#com.toxictom.blockboi.RunnerActivity@android:label was tagged at AndroidManifest.xml:31 to replace other declarations but no other declaration present
Q:\com.toxictom.blockboi\src\main\AndroidManifest.xml:30:3-86:17 Warning:
application@android:label was tagged at AndroidManifest.xml:30 to replace other declarations but no other declaration present
Q:\com.toxictom.blockboi\src\main\AndroidManifest.xml:31:5-40:16 Warning:
activity#com.toxictom.blockboi.RunnerActivity@android:label was tagged at AndroidManifest.xml:31 to replace other declarations but no other declaration present
> Task :com.toxictom.blockboi:processDebugResources
> Task :com.toxictom.blockboi:compileDebugJavaWithJavac FAILED
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\AdMobGM.java:28: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmBroadcastReceiver.java:7: error: package android.support.v4.content does not exist
import android.support.v4.content.WakefulBroadcastReceiver;
^
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmBroadcastReceiver.java:19: error: cannot find symbol
public class GcmBroadcastReceiver extends WakefulBroadcastReceiver
^
symbol: class WakefulBroadcastReceiver
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmPush.java:20: error: cannot find symbol
import android.support.v4.app.NotificationCompat;
^
symbol: class NotificationCompat
location: package android.support.v4.app
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GooglePlayServicesExtension.java:13: error: cannot find symbol
import android.support.v4.app.FragmentManager;
^
symbol: class FragmentManager
location: package android.support.v4.app
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GooglePlayServicesExtension.java:18: error: cannot find symbol
import android.support.v4.app.FragmentActivity;
^
symbol: class FragmentActivity
location: package android.support.v4.app
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmBroadcastReceiver.java:21: error: method does not override or implement a method from a supertype
@Override
^
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmBroadcastReceiver.java:31: error: cannot find symbol
startWakefulService(context, (intent.setComponent(comp)));
^
symbol: method startWakefulService(Context,Intent)
location: class GcmBroadcastReceiver
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmBroadcastReceiver.java:32: error: cannot find symbol
setResultCode(Activity.RESULT_OK);
^
symbol: method setResultCode(int)
location: class GcmBroadcastReceiver
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmIntentService.java:178: error: cannot find symbol
GcmBroadcastReceiver.completeWakefulIntent(intent);
^
symbol: method completeWakefulIntent(Intent)
location: class GcmBroadcastReceiver
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmPush.java:473: error: package NotificationCompat does not exist
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)
^
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmPush.java:476: error: package NotificationCompat does not exist
.setStyle(new NotificationCompat.BigTextStyle()
^
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GcmPush.java:473: error: package NotificationCompat does not exist
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)
^
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GooglePlayServicesExtension.java:759: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
RunnerJNILib.CloudResultData(s.getBytes(), 0 /*STATUS_NEW_GAME_DATA*/, fileId);
^
required: byte[],byte[],int,int
found: byte[],int,int
reason: actual and formal argument lists differ in length
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GooglePlayServicesExtension.java:773: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
RunnerJNILib.CloudResultData( null, 0 /*STATUS_NEW_GAME_DATA*/, fileId );
^
required: byte[],byte[],int,int
found: <null>,int,int
reason: actual and formal argument lists differ in length
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GooglePlayServicesExtension.java:894: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
RunnerJNILib.CloudResultData(s.getBytes(), 0 /*STATUS_NEW_GAME_DATA*/, fileId);
^
required: byte[],byte[],int,int
found: byte[],int,int
reason: actual and formal argument lists differ in length
Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GooglePlayServicesExtension.java:913: error: method CloudResultData in class RunnerJNILib cannot be applied to given types;
RunnerJNILib.CloudResultData( null, 0 /*STATUS_NEW_GAME_DATA*/, fileId );
^
required: byte[],byte[],int,int
found: <null>,int,int
reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Q:\com.toxictom.blockboi\src\main\java\com\toxictom\blockboi\GooglePlayServicesExtension.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
17 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':com.toxictom.blockboi:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
12 actionable tasks: 12 executed
C:\Windows\system32\cmd.exe exited with non-zero status (1)
Does anyone have any suggestions on how I can get the Android build working again?
Thanks,
Tom