Search Unity

[Solved] Unity IAP - CommandInvokationFailure: Failed to recompile android resource files.

Discussion in 'Unity IAP' started by ByQ, Jan 27, 2017.

Thread Status:
Not open for further replies.
  1. ByQ

    ByQ

    Joined:
    Nov 1, 2015
    Posts:
    14
    Hi,

    I've got problem with Unity IAP and Android.

    After I have imported Unity IAP package from Services windows I cannot build android apk.

    I've installed latest JDK 1.8 build 121 and Android SDK 25. Also tested on SDK 24

    Can anyone help me?

    This is error I get after compiling for Android:

    Code (CSharp):
    1. CommandInvokationFailure: Failed to recompile android resource files.
    2. /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/javac -bootclasspath "/Users/Rafal/Library/Android/sdk/platforms/android-25/android.jar" -d "/Users/Rafal/Android/Projekty/Unity3D/Super Max/Temp/StagingArea/bin/classes" -source 1.6 -target 1.6 -encoding UTF-8 "com/android/vending/billing/R.java" "com/super/max/R.java" "com/unity/purchasing/R.java" "com/unity/purchasing/googleplay/R.java"
    3.  
    4. stderr[
    5. com/super/max/R.java:8: error: <identifier> expected
    6. package com.super.max;
    7.             ^
    8. com/super/max/R.java:8: error: class, interface, or enum expected
    9. package com.super.max;
    10.                  ^
    11. com/super/max/R.java:8: error: class, interface, or enum expected
    12. package com.super.max;
    13.                   ^
    14. 3 errors
    15. ]
    16. stdout[
    17.  
    18. ]
    19. exit code: 1
    20. UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    21. UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, Int32 retriesOnFailure)
    22. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    23.  
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Were you able to build to Android before you integrated IAP? If you delete the Unity Purchasing folder and disable the IAP service, are you able to build to Android again?

    Which version of Unity are you using?
     
  3. ByQ

    ByQ

    Joined:
    Nov 1, 2015
    Posts:
    14
    Yes I could Build and run on Android. When i remove Unity Purchasing i can also Build and run.

    Im using unity 5.5.0f3

    Also im not using any other plugins yet (except iTween)
     
  4. ByQ

    ByQ

    Joined:
    Nov 1, 2015
    Posts:
    14
    I have fixed the problem.

    It seems that I cannot use "super" word in Bundle Identifier.

    After change Bundle Identifier from com.super.max to com.platform.max it worked.
     
Thread Status:
Not open for further replies.