Closed urthling closed 2 years ago
Hi,
You'll need to look further down, there will be an error in the output as well.
Oops, thought I had checked adt.log
but was a different output! My bad, here we go:
Stack trace:
Unexpected failure: Unable to run java: com.adobe.air.ADTException: gradle tool failed:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable
> Android resource linking failed
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:46: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka my.app:layout_constraintBottom_toBottomOf) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:46: AAPT: error: attribute layout_constraintVertical_bias (aka my.app:layout_constraintVertical_bias) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:46: AAPT: error: attribute layout_constraintTop_toTopOf (aka my.app:layout_constraintTop_toTopOf) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:46: AAPT: error: attribute layout_constraintStart_toStartOf (aka my.app:layout_constraintStart_toStartOf) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:59: AAPT: error: attribute layout_constraintHorizontal_bias (aka my.app:layout_constraintHorizontal_bias) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:59: AAPT: error: attribute layout_constraintTop_toTopOf (aka my.app:layout_constraintTop_toTopOf) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:59: AAPT: error: attribute layout_constraintEnd_toEndOf (aka my.app:layout_constraintEnd_toEndOf) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:59: AAPT: error: attribute layout_constraintStart_toEndOf (aka my.app:layout_constraintStart_toEndOf) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:75: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka my.app:layout_constraintBottom_toBottomOf) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:75: AAPT: error: attribute layout_constraintVertical_bias (aka my.app:layout_constraintVertical_bias) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:75: AAPT: error: attribute layout_constraintTop_toBottomOf (aka my.app:layout_constraintTop_toBottomOf) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:75: AAPT: error: attribute layout_constraintStart_toStartOf (aka my.app:layout_constraintStart_toStartOf) not found.
ERROR:/private/var/folders/88/hrtnfm195pq3vmvtvqjxbmsw0000gn/T/f0a5bda9-3539-4467-b5aa-e8cf6b637c82/com.google.firebase.inappmessaging.display/build/intermediates/packaged_res/release/layout/banner.xml:75: AAPT: error: attribute layout_constraintEnd_toEndOf (aka my.app:layout_constraintEnd_toEndOf) not found.
Right, that one is caused by missing a dependency androidx.constrainlayout
.
Are you using apm or manually adding extensions?
ah, awesome. of course, apm! K, I'll add it now..
If you are using apm it should have been added automatically. Could you tell me what extensions you are using and I'll check which one is missing this dependency.
I have most of your ANEs. but, from the log, it points to firebase.inappmessaging
no?
I have had to install the same packages a couple of times. I opened and closed a couple of tickets today as I was going through it.. I did run apm update
Oh yeah you are right, odd the pushnotifications extension definitely has that as a dependency.
Does apm install
run successfully for you?
yup, runs smoothly no errors..
Can you post your project lock file?
I do see the constraintlayout ane both in the descriptor -- and my IDE matches.. k, will do
Also are you keeping the AndroidStudioProject that AIR generates? Try deleting it to ensure you get a clean build.
Flag set not to keep project.. project-lock.txt
That all looks okay.. Hmm, could you try deleting the apm_packages directory and running apm install
again.
k..
no change but I think my IDE does not have all of the ANEs for some reason.. likely a FB bug.. going to try removing and adding them again
Ah, that was it, appears to be building properly now.. I did add the ane folder initially but removing and adding again did the trick. Thank you as always for your awesome help.
Not sure how this is different, so reopening Ok, so it builds, but now when it installs, it is not my icon and this is log
03-29 18:18:03.526 3492 7254 W System.err: java.lang.NullPointerException: Attempt to read from field 'java.lang.String aF.q.mPackageName' on a null object reference
03-29 18:18:03.526 3492 7254 W System.err: at aF.f.a(Unknown Source:134)
03-29 18:18:03.526 3492 7254 W System.err: at aF.M.a(Unknown Source:350)
03-29 18:18:03.526 3492 7254 W System.err: at aF.M.a(Unknown Source:2)
03-29 18:18:03.526 3492 7254 W System.err: at com.sec.android.sdhms.common.o.y(Unknown Source:22)
03-29 18:18:03.526 3492 7254 W System.err: at k.d.noteResumeComponent(Unknown Source:33)
03-29 18:18:03.526 3492 7254 W System.err: at com.samsung.android.app.usage.IUsageStatsWatcher$Stub.onTransact(IUsageStatsWatcher.java:67)
03-29 18:18:03.526 3492 7254 W System.err: at android.os.Binder.execTransact(Binder.java:739)
03-29 18:18:03.546 31215 31215 D AndroidRuntime: Shutting down VM
03-29 18:18:03.547 31215 31215 E AndroidRuntime: FATAL EXCEPTION: main
03-29 18:18:03.547 31215 31215 E AndroidRuntime: Process: my.app, PID: 31215
03-29 18:18:03.547 31215 31215 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.lifecycle.ProcessLifecycleOwnerInitializer: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.ProcessLifecycleOwnerInitializer" on path: DexPathList[[zip file "/data/app/my.app-7WzviRqy2XLnvzb585vGhg==/base.apk"],nativeLibraryDirectories=[/data/app/my.app-7WzviRqy2XLnvzb585vGhg==/lib/arm64, /data/app/my.app-7WzviRqy2XLnvzb585vGhg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6770)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6312)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6227)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.app.ActivityThread.access$1200(ActivityThread.java:238)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1787)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7073)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.ProcessLifecycleOwnerInitializer" on path: DexPathList[[zip file "/data/app/my.app-7WzviRqy2XLnvzb585vGhg==/base.apk"],nativeLibraryDirectories=[/data/app/my.app-7WzviRqy2XLnvzb585vGhg==/lib/arm64, /data/app/my.app-7WzviRqy2XLnvzb585vGhg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:121)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at androidx.core.app.CoreComponentFactory.instantiateProvider(CoreComponentFactory.java:67)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6754)
03-29 18:18:03.547 31215 31215 E AndroidRuntime: ... 10 more
03-29 18:18:03.602 3492 7254 W System.err: java.lang.NullPointerException: Attempt to read from field 'java.lang.String aF.q.mPackageName' on a null object reference
03-29 18:18:03.602 3492 7254 W System.err: at aF.f.a(Unknown Source:134)
03-29 18:18:03.602 3492 7254 W System.err: at aF.M.a(Unknown Source:350)
03-29 18:18:03.602 3492 7254 W System.err: at aF.M.a(Unknown Source:2)
03-29 18:18:03.602 3492 7254 W System.err: at com.sec.android.sdhms.common.o.y(Unknown Source:22)
03-29 18:18:03.602 3492 7254 W System.err: at k.d.noteResumeComponent(Unknown Source:33)
03-29 18:18:03.602 3492 7254 W System.err: at com.samsung.android.app.usage.IUsageStatsWatcher$Stub.onTransact(IUsageStatsWatcher.java:67)
03-29 18:18:03.602 3492 7254 W System.err: at android.os.Binder.execTransact(Binder.java:739)
Everything appears to be part of the build in terms of assets etc.. Not sure why its not my icon?
Did you regenerate your app descriptor? That's an error from an old entry .
Ah.. trying again..
K, now mention of initializing firebase.. I am calling Firebase.service.initialiseApp()
early on. And is working ok on iOS
03-29 18:33:56.322 3492 3737 W System.err: java.lang.NullPointerException: Attempt to read from field 'java.lang.String aF.q.mPackageName' on a null object reference
03-29 18:33:56.322 3492 3737 W System.err: at aF.f.a(Unknown Source:134)
03-29 18:33:56.322 3492 3737 W System.err: at aF.M.a(Unknown Source:350)
03-29 18:33:56.323 3492 3737 W System.err: at aF.M.a(Unknown Source:2)
03-29 18:33:56.323 3492 3737 W System.err: at com.sec.android.sdhms.common.o.y(Unknown Source:22)
03-29 18:33:56.323 3492 3737 W System.err: at k.d.noteResumeComponent(Unknown Source:33)
03-29 18:33:56.323 3492 3737 W System.err: at com.samsung.android.app.usage.IUsageStatsWatcher$Stub.onTransact(IUsageStatsWatcher.java:67)
03-29 18:33:56.323 3492 3737 W System.err: at android.os.Binder.execTransact(Binder.java:739)
03-29 18:33:56.627 3494 3494 D AndroidRuntime: Shutting down VM
03-29 18:33:56.627 3494 3494 E AndroidRuntime: FATAL EXCEPTION: main
03-29 18:33:56.627 3494 3494 E AndroidRuntime: Process: my.app, PID: 3494
03-29 18:33:56.627 3494 3494 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {my.app/my.app.AIRAppEntry}: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process my.app. Make sure to call FirebaseApp.initializeApp(Context) first.
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4016)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4048)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1950)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7073)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process my.app. Make sure to call FirebaseApp.initializeApp(Context) first.
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at com.google.firebase.FirebaseApp.getInstance(FirebaseApp.java:183)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at com.google.firebase.perf.FirebasePerformance.getInstance(FirebasePerformance.java:132)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at com.google.firebase.perf.FirebasePerformanceInitializer.onAppColdStart(FirebasePerformanceInitializer.java:29)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at com.google.firebase.perf.application.AppStateMonitor.sendAppColdStartUpdate(AppStateMonitor.java:274)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at com.google.firebase.perf.application.AppStateMonitor.onActivityResumed(AppStateMonitor.java:195)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.Application.dispatchActivityResumed(Application.java:264)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.Activity.onResume(Activity.java:1403)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at air.com.adobe.appentry.AppEntry.onResume(AppEntry.java:465)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.Activity.performResume(Activity.java:7558)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4008)
03-29 18:33:56.627 3494 3494 E AndroidRuntime: ... 11 more
03-29 18:33:57.148 3492 3737 W System.err: java.lang.NullPointerException: Attempt to read from field 'java.lang.String aF.q.mPackageName' on a null object reference
03-29 18:33:57.148 3492 3737 W System.err: at aF.f.a(Unknown Source:134)
03-29 18:33:57.148 3492 3737 W System.err: at aF.M.a(Unknown Source:350)
03-29 18:33:57.148 3492 3737 W System.err: at aF.M.a(Unknown Source:2)
03-29 18:33:57.148 3492 3737 W System.err: at com.sec.android.sdhms.common.o.y(Unknown Source:22)
03-29 18:33:57.148 3492 3737 W System.err: at k.d.noteResumeComponent(Unknown Source:33)
03-29 18:33:57.148 3492 3737 W System.err: at com.samsung.android.app.usage.IUsageStatsWatcher$Stub.onTransact(IUsageStatsWatcher.java:67)
03-29 18:33:57.148 3492 3737 W System.err: at android.os.Binder.execTransact(Binder.java:739)
I believe that can happen if you haven't provided your resources in the resdir ?
must have missed that step.. I have done it b4 but I guess I need to regenerate? ANE-CustomResources
right?
Oh much easier to just add them into the resdir now
https://airsdk.dev/docs/tutorials/platform/android/custom-resources
Just add a <resdir>res</resdir>
to your manifest just outside the android node and add a "res" dir to your application, place the values/values.xml
content in there.
Ah, awesome ty, k doing now..
Ok, I have the res folder with the piush notif assets generated -- but no values.xml...?
Do you have your firebase configuration json from the firebase console? https://docs.airnativeextensions.com/docs/firebase/setup/configuration-files#android
You can run it through this to convert it to your values.xml
https://docs.airnativeextensions.com/firebase/tools/google-services-json-to-xml.html
make sure you put it in a values
directory, so should be res/values/values.xml
(Just ignore the ANE stuff on that link, need to update that still :| )
Ah, fantabulous, k..
AHHHH! all is well and also Facebook now working on Android! 'tis a good day!
Thank you again for saving me time and helping me through that :)
Android: This looks like just a warning, but this prevents my IDE from continuing the build
iOS all is well