google-ar / arcore-unreal-sdk

ARCore SDK for Unreal
https://developers.google.com/ar/
Apache License 2.0
277 stars 122 forks source link

[S7 Edge SM-G935F] - Application manifest must contain meta-data com.google.ar.core.min_apk_version #11

Closed ClixStudios closed 6 years ago

ClixStudios commented 6 years ago

Evening, I'm having an issue running the UE4 Hello AR on my Samsung Galaxy S7 Edge SM-G935F.

This is the logcat output: 03-06 21:07:41.698 2903 2918 E ARCore-APK: Error while checking app details and ARCore status 03-06 21:07:41.698 2903 2918 E ARCore-APK: com.google.ar.core.exceptions.FatalException: Application manifest must contain meta-data com.google.ar.core.min_apk_version 03-06 21:07:41.698 2903 2918 E ARCore-APK: at com.google.ar.core.ArCoreApkImpl.initializeAppInfo(ArCoreApkImpl.java:241) 03-06 21:07:41.698 2903 2918 E ARCore-APK: at com.google.ar.core.ArCoreApkImpl.isInstalledAndCompatible(ArCoreApkImpl.java:189) 03-06 21:07:41.698 2903 2918 E ARCore-APK: at com.google.ar.core.ArCoreApkImpl.checkAvailability(ArCoreApkImpl.java:74) 03-06 21:07:41.698 2903 2918 E ARCore-APK: at com.google.ar.core.ArCoreApkJniAdapter.checkAvailability(ArCoreApkJniAdapter.java:17)

And the Android Manifest of the APK: https://pastebin.com/hCPQ4jKg

I'm using the SM-G935F variant of the S7 Edge, with AR Core installed (and even tested with an ARCore enabled app from the Play Store that seems to work perfectly fine).

ClixStudios commented 6 years ago

I've added the following into packaging settings -> Android -> Advanced APKPackaging -> Extra Settings for <activity>: <meta-data android:name="com.google.ar.core.min_apk_version" android:value="24"/> And I appear to be getting another error asking:

03-06 22:07:36.259 29069 29087 E ARCore-APK: com.google.ar.core.exceptions.FatalException: Application manifest must contain activity com.google.ar.core.InstallActivity 03-06 22:07:36.259 29069 29087 E ARCore-APK: at com.google.ar.core.ArCoreApkImpl.initializeAppInfo(ArCoreApkImpl.java:258) 03-06 22:07:36.259 29069 29087 E ARCore-APK: at com.google.ar.core.ArCoreApkImpl.isInstalledAndCompatible(ArCoreApkImpl.java:189) 03-06 22:07:36.259 29069 29087 E ARCore-APK: at com.google.ar.core.ArCoreApkImpl.checkAvailability(ArCoreApkImpl.java:74) 03-06 22:07:36.259 29069 29087 E ARCore-APK: at com.google.ar.core.ArCoreApkJniAdapter.checkAvailability(ArCoreApkJniAdapter.java:17)

bopangzz commented 6 years ago

You shouldn't need to add the extra setting in the Android Manifest. Are you enabling build with gradle option in Project Settings->Android? Also can you attach the full build log in Unreal console when you package the APK? It looks like the manifest in the ARCore aar doesn't got merged correctly to your app.

ClixStudios commented 6 years ago

Aye, just thought I could get past the error if I give it something.

I haven't ticked the "gradle" option, but now that I have, I'm getting the following build errors: UATHelper: Packaging (Android (ASTC)): FAILURE: Build failed with an exception. UATHelper: Packaging (Android (ASTC)): What went wrong: UATHelper: Packaging (Android (ASTC)): A problem occurred configuring project ':app'. UATHelper: Packaging (Android (ASTC)): > Could not resolve all dependencies for configuration ':app:_debugApk'. UATHelper: Packaging (Android (ASTC)): > A problem occurred configuring project ':permission_library'. UATHelper: Packaging (Android (ASTC)): > You have not accepted the license agreements of the following SDK components: UATHelper: Packaging (Android (ASTC)): [Android Support Repository]. UATHelper: Packaging (Android (ASTC)): Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager. UATHelper: Packaging (Android (ASTC)): Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html UATHelper: Packaging (Android (ASTC)): Try: UATHelper: Packaging (Android (ASTC)): Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. UATHelper: Packaging (Android (ASTC)): BUILD FAILED UATHelper: Packaging (Android (ASTC)): Total time: 12.92 secs UATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c "A:\ARCore\arcore-unreal-sdk\HelloARUnreal 4.18\Intermediate/Android/APK\gradle\rungradle.bat" :app:assembleDebug UATHelper: Packaging (Android (ASTC)): (see A:\ARCore\UnrealEngine\Engine\Programs\AutomationTool\Saved\Logs\UAT_Log.txt for full exception trace) UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error_Unknown) UATHelper: Packaging (Android (ASTC)): BUILD FAILED PackagingResults: Error: Unknown Error

Even though I have already accepted the SDK license in Unreal (and during codeworks installation).

bopangzz commented 6 years ago

Ok, so the bug is the manifest doesn't get merged correctly when not building with gradle. Now you just need to get pass the license check in gradle.

tedruxpin commented 6 years ago

Hello ClixStudios,

I resolved this using the following advice:

Replace your current package.xml file with the version available on the pre-release build from 4.19: https://github.com/EpicGames/UnrealEngine/blob/4.19/Engine/Source/ThirdParty/Android/package.xml

On Windows you can then delete your current license file from NVPACK\android-sdk-windows\licenses\android-sdk-license

Then finally start Unreal and go to Project Settings -> Platforms -> Android and click the "Accept SDK License"

The next time you build and package with gradle it should go through just fine.

Good luck! Ted

ClixStudios commented 6 years ago

Magic! It has to be!

That's worked perfectly! Thank you both @bopangzz and @tedruxpin https://photos.app.goo.gl/0S7vToMUucJW1mnd2

winngo commented 6 years ago

I can't believe that Thank you so much !