I am trying to implement a dialogsystem (Google Dialogflow CX) into an Android App. I am trying to connect via REST. Appparently, CX doesn't support API keys and the library commonly used is not supported in Android either, so I am facing problems.
With the credentials available in raw (implementation as previously used with dialogflow ES), I get the following error message:
07-09 12:10:27.841 2600-2600/com.softbankrobotics.jokeswithdialogflow E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.softbankrobotics.jokeswithdialogflow, PID: 2600
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Duration;
at com.google.auth.oauth2.OAuth2Credentials.<clinit>(OAuth2Credentials.java:70)
at com.google.auth.oauth2.ServiceAccountCredentials.fromStream(ServiceAccountCredentials.java:475)
at com.softbankrobotics.jokeswithdialogflow.data.DialogflowDataSource.<init>(DialogflowDataSource.kt:17)
at com.softbankrobotics.jokeswithdialogflow.MainActivity.onCreate(MainActivity.kt:52)
at android.app.Activity.performCreate(Activity.java:6257)
...
It seems the first error refers to the min SDK having to be at 26. Unfortunately, I need 23 for my app to run on pepper robot - so I can't alter this.
I would like to authenticate once (e.g. with my own Google account), with validity for all the test users. Safety aspects can be disregarded here, as the implementation is intended for testing in a scientific study, only.
Thank you in advance - any help is appreciated!
Related
Error Detected on 1 device during testing
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.apps.messaging/com.google.android.apps.messaging.ui.conversationlist.ShareIntentActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f08014a
More info about this..... This expands this..
FATAL EXCEPTION: main
Process: com.google.android.apps.messaging, PID: 26814
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.apps.messaging/com.google.android.apps.messaging.ui.conversationlist.ShareIntentActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f08014a
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2805)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2883)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1613)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f08014a
at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:229)
at android.content.res.Resources.getDrawableForDensity(Resources.java:876)
at android.content.res.Resources.getDrawable(Resources.java:819)
at android.content.Context.getDrawable(Context.java:605)
at ym.a(PG:15)
at com.google.android.apps.messaging.ui.common.ListEmptyView.a(PG:5)
at nog.c(PG:20)
at cy.b(PG:48)
at nol.b(PG:15)
at android.support.v4.app.Fragment.g(PG:120)
at em.f(PG:71)
at ee.a(PG:447)
at ee.c(PG:436)
at ee.d(PG:395)
at ee.a(PG:427)
at ee.b(PG:327)
at ee.a(PG:535)
at ee.c(PG:217)
at ee.c(PG:109)
at ee.i(PG:61)
at di.onStart(PG:114)
at ma.onStart(PG:128)
at vit.onStart(PG:60)
at lkx.onStart(PG:33)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1334)
at android.app.Activity.performStart(Activity.java:7033)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2768)
... 9 more
Error Detected on 1 device during testing
Fatal AndroidRuntime Exception detected.
Error Detected on 1 device during testing
Native crash of com.Tom.Fireg
4 issues on Android 9 (SDK 28)
I don't know how to fix this, please help me. I got my TestFlight running on AppleStore but it crashes when I play too much so I am trying to fix that. However, on Google PlayStore, I can't even upload due to these errors. Help me please. When I click on android stimulator to run on my unity platform it works fine, just uploading it gives me errors.
I followed this YouTube video how to upload on google playstore. I changed Scripting Backend to IL2CPP in order to enable ARM64. ARMv7 was automatically selected. Just changed Scripting backend and enabled ARM64. Made a key manager to create a key and selected release under Minify. Create symbols.zip on video it said to choose enable. However, I had these options, disabled, public, or debugging. I choose publish since this released map and zip to use on google play. I don't think I did anything wrong here but help me out, please.
Check the packages you have included in the project. They probably weren't included in the Android Manifest.
Android uses the file called Android Manifest within your app to define some basic information.
Among the information he seeks are dependences.
For example if you have implemented a function to send a notification, it will need to be included in the Manifest file.
If there are no dependencies, the app will crash.
Try exporting your game to Android Studio and running it from there. It should show you all the problems.
My goal is to be able to make my Android TV Mi Box S (Oreo 8.1) transcode properly Dolby Digital+ (EAC3) sounds to Dolby Digital (AC3) and output it to, my AVR through SPDIF.
This transcodindg is possible with Kodi 18.1 applicition but is not proposed by other application or Android 8.1 settings. As Kodi is able to do it I reverse engineered Android stack. My conclusion are : - Android Oreo embeds any necessary codecs ans other stuff to do this transcoding but does not propose the settings to configure this - Android Pie proposes the wanted surround sound setting (output Dolby Digital on SPDIF)
So my goal is to backport Android TvSettings application from Pie to Oreo
I first tryed to generate TvSettings with Android Studio. I hacked the application resources but stopped when I understood that I would have to generate platfom dependacies (for instance SettingsLib.jar)
My second trial is to generate the entire Android platform. The build is complete and I can deploy TvSettings application on a x86 TV simulation BUT when I launched the TvSettings appplication I get this error :
--------- beginning of crash
2019-04-01 12:21:04.976 3987-3987/com.android.tv.settings
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.tv.settings, PID: 3987
java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider:
java.lang.ClassNotFoundException: Didn't find class
"android.support.v4.content.FileProvider" on path: DexPathList[[zip
file
"/data/app/com.android.tv.settings-2DkaCncwGQ874WP-kx3G4Q==/base.apk"],nativeLibraryDirectories=[/data/app/com.android.tv.settings-2DkaCncwGQ874WP-kx3G4Q==/lib/x86,
/system/lib, /vendor/lib]]
I searched this error on internet and it seems that it deals with multidex feature. This multidex feature is well documented for clean developped Android appliacation but nor reaally for applications extracted from Android platform and deployed with adb.
This problem is related to java libraries loading.
I found threads referring Android multidex feature but only for applications buils with Android Studio/Gradle and my app was build with Android platform
What can I do?
have you included fileProvider in your manifest?
Well there seems to be a root error during deployment of my TvSettings application. Here is its log :
E/dex2oat: Invalid version number in dex file header. File: base.apk
I read several pages and found this one very interesting : https://source.android.com/devices/tech/dalvik/configure
So, due to different optimizations, platform apps are not generated with the same file format that apps generated above platform API
My idea is to generate the whole platform including TvSettings app and to deploy TvSettings with adb. So the apk format may be wrong.
My next step is to add in TvSettings/Settings/Android.mk the flag below :
LOCAL_DEX_PREOPT := false
I'm using khttp to perform HTTP requests in my Android app, but every time I start adding breakpoints to my app in Android Studio 3.1, I'm getting this really annoying Illegal State Exception, at which point I them need to restart Android Studio. Here's an example of the exception thrown:
E/AndroidRuntime: FATAL EXCEPTION: Thread-4
Process: com.sbrl.peppermint, PID: 10777
java.lang.IllegalStateException: Cannot access request header fields after connection is set
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getRequestProperties(HttpURLConnectionImpl.java:232)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getRequestProperties(DelegatingHttpsURLConnection.java:182)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getRequestProperties(Unknown Source:0)
at com.android.tools.profiler.support.network.httpurl.TrackedHttpURLConnection.getRequestProperties(TrackedHttpURLConnection.java:204)
at com.android.tools.profiler.support.network.httpurl.TrackedHttpURLConnection.trackPreConnect(TrackedHttpURLConnection.java:63)
at com.android.tools.profiler.support.network.httpurl.TrackedHttpURLConnection.connect(TrackedHttpURLConnection.java:126)
at com.android.tools.profiler.support.network.httpurl.HttpsURLConnection$.connect(HttpsURLConnection$.java:366)
at khttp.responses.GenericResponse.openRedirectingConnection$khttp(GenericResponse.kt:125)
at khttp.responses.GenericResponse.getConnection(GenericResponse.kt:163)
at khttp.responses.GenericResponse.getRaw(GenericResponse.kt:207)
at khttp.responses.GenericResponse.getContent(GenericResponse.kt:216)
at khttp.responses.GenericResponse.init$khttp(GenericResponse.kt:377)
at khttp.KHttp.request(KHttp.kt:61)
at khttp.KHttp.request$default(KHttp.kt:59)
I know that this question explains why this is happening, but my question is this:
How can I black-box the khttp library (similar to the way that Chrome allows you to black-box a JS source file), such that the Android debugger does not inspect it - throwing this exception?
My Android app is using 3rd party library that uses native libraries.
It is built with targetSdkVersion 21.
When running my app on Android 7 phones (in my example, LG G20), users start getting a visible error message upon process initialization.
The error message screenshot is attached.
When running the same app on Android 5.x and 6.x, there is no error shown to the user, although there is still a matching warning message in the log. Log message looks like:
library "/data/app/org.iotivity.base.examples.simpleclient-1/lib/arm/libocstack-jni.so" has invalid DT_NEEDED entry "./obj/local/armeabi/libocprovision.so"
ךibrary "/data/app/org.iotivity.base.examples.simpleclient-1/lib/arm/libocstack-jni.so" has invalid DT_NEEDED entry "./obj/local/armeabi/libocpmapi.so"
So it looks likes Android 7 "decides" to show to the end user a warning which is kept for the log only in previous versions.
I would appreciate:
1. Ideas on how the error message can be suppressed
2. Hints on what is the right solution for the issue (this is a 3rd party code, but I may try to tweak the build process)
Thanks in advance
Max
I'm trying to run the following example using the AWS android SDK:
https://github.com/awslabs/aws-sdk-android-samples/tree/master/SimpleDB_HighScores
I receive the following error when trying to add/remove/view an entry from the Android APP:
01-16 12:09:23.986: E/AndroidRuntime(23943): Caused by: java.lang.NoClassDefFoundError: com.amazonaws.auth.BasicAWSCredentials
I have provided my Access Key ID and also my Secret Access Key from my AWS account on the code.
I have also linked all the necessary libraries.
Does anyone knows what is going on?
I have already googled the problem and the solutions provided on other answers do not work for me.