Announcement

Collapse
No announcement yet.

[4.21.2] Android Packaging Error - IsGearVRApplication() is already defined in class GameActivity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Hey! I tried adding your code, but it wasn't effective, I checked out more information about the bug.

    Code:
    > Task :app:compileDebugJavaWithJavac
    Putting task artifact state for task ':app:compileDebugJavaWithJavac' into context took 0.0 secs.
    file or directory 'Z:\app\libs', not found
    file or directory 'Z:\app\src\main\libs', not found
    file or directory 'Z:\app\src\debug\java', not found
    Executing task ':app:compileDebugJavaWithJavac' (up-to-date check took 0.026 secs) due to:
    Task has failed previously.
    All input files are considered out-of-date for incremental task ':app:compileDebugJavaWithJavac'.
    Compiling with source level 1.7 and target level 1.7.
    file or directory 'Z:\app\libs', not found
    file or directory 'Z:\app\src\main\libs', not found
    Creating new cache for classAnalysis, path Z:\.gradle\4.1\javaCompile\classAnalysis.bin, access org.gradle.cache.internal.DefaultCacheAccess@115674e7
    Creating new cache for jarAnalysis, path Z:\.gradle\4.1\javaCompile\jarAnalysis.bin, access org.gradle.cache.internal.DefaultCacheAccess@115674e7
    Creating new cache for taskJars, path Z:\.gradle\4.1\javaCompile\taskJars.bin, access org.gradle.cache.internal.DefaultCacheAccess@115674e7
    Creating new cache for taskHistory, path Z:\.gradle\4.1\javaCompile\taskHistory.bin, access org.gradle.cache.internal.DefaultCacheAccess@115674e7
    :app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
    file or directory 'Z:\app\src\debug\java', not found
    Compiling with JDK Java compiler API.
    Z:\app\src\main\java\com\epicgames\ue4\GameApplication.java:7: error: cannot find symbol
    import android.arch.lifecycle.ProcessLifecycleOwner;
    ^
    symbol: class ProcessLifecycleOwner
    location: package android.arch.lifecycle
    Z:\app\src\main\java\com\epicgames\ue4\GameApplication.java:22: error: cannot find symbol
    ProcessLifecycleOwner.get().getLifecycle().addObserver(this);
    ^
    symbol: variable ProcessLifecycleOwner
    location: class GameApplication
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    2 errors
    
    :app:compileDebugJavaWithJavac (Thread[Task worker for ':' Thread 4,5,main]) completed. Took 2.085 secs.
    
    FAILURE: Build failed with an exception.
    How can I fix it ?

    Leave a comment:


  • replied
    Getting a similar error when trying to build to quest. It seems to be project specific, since my empty project with the same settings built without error. I'm not sure what to do at this point.

    Click image for larger version

Name:	Error.PNG
Views:	329
Size:	258.6 KB
ID:	1772019

    Leave a comment:


  • replied
    Annogen,

    With space in path try to put quote :
    Code:
    cd "%GRADLEPATH%"
    If it doesn't works, let's try something :
    open cmd.exe
    Code:
    cd "C:\Users\travi\Documents\Unreal Projects\ProoferVRUE 4.24\Intermediate\Android\APK\gradle\"
    rungradle.bat :app:assembleRelease
    is build working or is there an error?
    Last edited by NumZer; 02-20-2020, 08:12 PM.

    Leave a comment:


  • replied
    NumZer

    Like this? It's not working for me unfortunately

    :doneStart
    cd %GRADLEPATH%
    subst Z: "%CD%"
    pushd Z:
    call "%GRADLEPATH%\gradlew.bat" %GRADLE_CMD_LINE_ARGS%
    set GRADLEERROR=%ERRORLEVEL%
    popd
    subst Z: /d
    exit /b %GRADLEERROR%

    I keep getting the error "ERROR: cmd.exe failed with args /c "C:\Users\travi\Documents\Unreal Projects\ProoferVRUE 4.24\Intermediate\Android\APK\gradle\rungradle.bat" :app:assembleRelease"

    I've accepted the SDK license, deleted it, accepted it again, generated a new keystore, just nothing is working for me, Im at wits end, I have a hard deadline in a month and I'm starting to get a bit nervous!

    Leave a comment:


  • replied
    Hey,
    I don't know if it can works for you but when i add this :
    Code:
    cd %GRADLEPATH%
    before :
    Code:
    subst Z: "%CD%"
    into the file Unreal4\Epic Games\UnrealEngine\Engine\Intermediate\Android\APK\gradle\rungradle.bat

    it works for me.
    bye

    Leave a comment:


  • replied
    Originally posted by Juanmilanese View Post
    So you can't build with gradle. But now Ant is deprecated? so... you can't build for oculus mobile period?
    Don't know but for example, I'm stuck with the same thing: https://forums.unrealengine.com/deve...on-and-or-java

    Leave a comment:


  • replied
    So you can't build with gradle. But now Ant is deprecated? so... you can't build for oculus mobile period?

    Leave a comment:


  • replied
    I have the same error but doesn't seem to be the same cause:
    https://answers.unrealengine.com/que...7278/view.html

    Leave a comment:


  • replied
    HI, I build for Oculus Quest and I have simmilar error:

    LogPlayLevel: Error: ERROR: cmd.exe failed with args /c "C:\Users\user\Documents\Unreal Projects\Project_OQ\Intermediate\Android\APK\gradle\rungradle.bat" :app:assembleDebug

    I've searched in forums but without good result , any ideas?

    Leave a comment:


  • replied
    Bah, just found out it was because I had the WaveVR Plugin on with SteamVR and the Oculus plugin on. Depending on which platform you're building for (Vivewave for me) make sure the others are disabled.

    Leave a comment:


  • [4.21.2] Android Packaging Error - IsGearVRApplication() is already defined in class GameActivity

    Hey UE4 friends!

    Trying to launch a android project using UE4 4.21.1, but got into this hiccup:

    Code:
    LogPlayLevel: :app:generateDebugSources
    LogPlayLevel: :permission_library:generateDebugSources
    LogPlayLevel: Note: Z:\permission_library\src\main\java\com\google\vr\sdk\samples\permission\PermissionFragment.java uses or overrides a deprecated API.
    LogPlayLevel: Note: Recompile with -Xlint:deprecation for details.
    LogPlayLevel: :permission_library:compileDebugJavaWithJavac
    LogPlayLevel: :permission_library:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
    LogPlayLevel: :app:javaPreCompileDebug
    LogPlayLevel: Error: Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:590: error: method AndroidThunkJava_IsGearVRApplication() is already defined in class GameActivity
    LogPlayLevel:     public boolean AndroidThunkJava_IsGearVRApplication()
    LogPlayLevel:                    ^
    LogPlayLevel: Note: Some input files use or override a deprecated API.
    LogPlayLevel: Note: Recompile with -Xlint:deprecation for details.
    LogPlayLevel: 1 error
    LogPlayLevel: :app:compileDebugJavaWithJavac FAILED
    LogPlayLevel: FAILURE: Build failed with an exception.
    LogPlayLevel: * What went wrong:
    LogPlayLevel: Execution failed for task ':app:compileDebugJavaWithJavac'.
    LogPlayLevel: > Compilation failed; see the compiler error output for details.
    LogPlayLevel: * Try:
    LogPlayLevel: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    LogPlayLevel: * Get more help at https://help.gradle.org
    LogPlayLevel: 59 actionable tasks: 59 executed
    LogPlayLevel: BUILD FAILED in 25s
    LogPlayLevel: Error: ERROR: cmd.exe failed with args /c "D:\Workspaces\VMatos_TrainingSim\Intermediate/Android/APK\gradle\rungradle.bat" :app:assembleDebug
    LogPlayLevel:        (see C:\Users\VMatos\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Epic+UE_4.21\Log.txt for full exception trace)
    LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown)
    LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 45.598880
    LogPlayLevel: BUILD FAILED
    PackagingResults: Error: Launch failed! Unknown Error
    LogPlayLevel: Launcher Device ID: Android_ASTC@FA95PAZ00024
    LogPlayLevel: PlayLevel: No blueprints needed recompiling
    LogCook: Display: Discovering localized assets
    LogCook: Display: Iterative cooking summary for AllDesktop,
    At first, I thought it was because I simply needed to update my Android SDK through Codework the android batchfile or that I hadn't accepted that licensing message on the project settings. Then I thought it was that my environment variables weren't mapped correctly after the update. At this point, I'm out of ideas and looking to see if any of you wonderful people can help me! I've posted images of my settings and by environment variables below!

    Thank you!

    Click image for larger version  Name:	Project-Settings.PNG Views:	1 Size:	102.2 KB ID:	1643680Click image for larger version  Name:	Android-SDK-Settings.PNG Views:	1 Size:	54.1 KB ID:	1643681Click image for larger version  Name:	Environment-Variables.PNG Views:	1 Size:	28.2 KB ID:	1643682
    Last edited by Victor Matos; 07-18-2019, 08:35 AM. Reason: Put UE4 Version
Working...
X