Problem:
I am trying to create a simple app to try Modules in Google App Engine Python on Development Server(Development SDK 1.9.2). But I do not see the modules getting started at runtime(log messages specifying the ports on which they are started).
Logs when I start the app using the Launcher on the development server:
2014-04-13 02:40:47 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=11080', '--admin_port=8003', u'C:\\gaurav\\coding\\python\\androidbackend1']"
INFO 2014-04-13 02:40:50,572 devappserver2.py:764] Skipping SDK update check.
INFO 2014-04-13 02:40:50,627 api_server.py:171] Starting API server at: http://localhost:59432
INFO 2014-04-13 02:40:50,631 dispatcher.py:182] Starting module "default" running at: http://localhost:11080
INFO 2014-04-13 02:40:50,634 admin_server.py:117] Starting admin server at: http://localhost:8003
INFO 2014-04-13 02:40:56,062 module.py:627] default: "GET / HTTP/1.1" 200 12
This Modules doc page at GAE for Python does not mention anything about development server. From another link, I figured out that on development server, all the modules are started at the beginning of app execution and they only differ in the port number of their URLs
Context:
I created a new app using the Google Launcher which generates a default "main.py" and "app.yaml". I then copied the "main.py" into a file named "modulem1.py", while retaining "main.py". I copied "app.yaml" into a file named "modulem1.yaml", while retaining the "app.yaml" file. I added the following line to "modulem1.yaml":
module: modulem1
I want to use Google Endpoints API to interact between the web app and Android app. So I need to use module for that and therefore I am trying a small web app with modules
I should be missing something obvious. Appreciate any help
If you are using the Google App Engine Launcher, then you will need to provide the full path to your second yaml file modulem1.yaml
Then once you start it, you can view the Logs and see that the modulem1 module has been launched at http://localhost:8080 and the default module has been launched at http://localhost:8081
Related
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 am developing app of video chat in Web RTC.
I am going through documentation of Web RTC.
I have followed all steps mentioned for Getting the Code
export GYP_DEFINES="OS=android"
fetch --nohooks webrtc_android
gclient sync
I have all src code of web rtc in my root directory. As per documentation say we have to compile source to use in our application. Here i got error while compiling source using following command.
$ gn gen out/Default --args='target_os="android" target_cpu="arm"'
ERROR at //build/config/android/internal_rules.gni:636:3: Can't load input file.
import("//third_party/ijar/ijar.gni")
^-----------------------------------
Unable to load:
/Users/c86/webrtc-checkout/src/third_party/ijar/ijar.gni
I also checked in the secondary tree for:
/Users/c86/webrtc-checkout/src/build/secondary/third_party/ijar/ijar.gni
See //build/config/android/rules.gni:8:1: whence it was imported.
import("//build/config/android/internal_rules.gni")
^-------------------------------------------------
See //webrtc/examples/BUILD.gn:12:3: whence it was imported.
import("//build/config/android/rules.gni")
^----------------------------------------
See //BUILD.gn:13:5: which caused the file to be included.
"//webrtc/examples",
^------------------
How can I solve this? Am I going in right direction to develop app of video chat on Web RTC?
Building WebRTC for Android is only supported on Ubuntu(14 / 16).
Currently not supported in macOS.
I am trying to provision the Nymi band from my android app. I am using the sample code from the Nymi Android SDK 2.0 (Can be downloaded from here:). I removed all the code related to the Nymulator(Nymi band emulator). I want to test the provisioning with the real Nymi band. However,when I click the provision button, the app get crashed. I tried to debug it with the exception breakpoints and I got the "getsockopt errno 88" error in my debugger:
I am attaching the screenshot too.
I did some research on google , and found that the errno 88 is
#define ENOTSOCK 88 /* Socket operation on non-socket */
During the app launch, I see the following message in the Debug Console:
Connected to the target VM, address: 'localhost:8604', transport: 'socket'
which I think,the connection to socket is fine. I am not sure,what makes the socket connection go wrong later.
This is what I see in my LOgCat after I click the provision button:(I am posting only some part of the error message,because the error message in Logcat is way too long)
Edit: I added some breakpoints,and I found where the app is crashing. I found this code:
try {
System.loadLibrary("_nymi_sdk_net");
_loaded = true;
} catch (UnsatisfiedLinkError var6) {
return false;
}
At system.load library, I am getting the error.
Edit 2: I changed the libraries from net to native ,as net is for emulators and native is for device. This time new error occurs at the same line:System.loadLibrary("_nymi_sdk");
Screenshot:
(Disclaimer: I know nothing of this SDK or the band, and this answer is just a speculation. And I've deleted my earlier answer as it was a missed shot in the dark.)
There is a minor hint in the SDK's README.md:
Prerequisites:
Android Development:
[...]
To use the BasicExample app with a Nymi Band, the NCL library in Examples\BasicExample\libs must be replaces with the native library in
NCL\native\libs
You must remove all files and folders from BasicExample\libs and copy all files from NCL\native\libs there instead.
(I wonder why they didn't emphasize this much harder...)
So the libs folder should contain the following folders and files:
I am in the process of learning to create google-app-engine as well as to generate Endpoint client library(for Android) from my app-engine application.
So far I have done the following things
Step 1 : Create Endpoint API : Complete
I have followed the instructions given here(using Maven) and have successfully deployed the app-engine application
https://developers.google.com/appengine/docs/java/endpoints/getstarted/backend/
Step 2 : Generate Client Library(for Android) : Getting ERROR here
I have followed the instruction here
https://developers.google.com/appengine/docs/java/endpoints/gen_clients
I gave the following command from the root directory of my app-engine application
endpoints.sh get-client-lib Greetings
But getting the following error
Dec 16, 2013 5:47:43 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
SEVERE: Received exception processing ./war/WEB-INF/appengine-web.xml
com.google.apphosting.utils.config.AppEngineConfigException: Could not locate /Users/raj/Documents/workspace-maven/helloendpoints/./war/WEB-INF/appengine-web.xml
Give below are my questions,
Is this command execution right?
endpoints.sh get-client-lib Greetings
In the documentation in google ; the second argument is
specified as 'get-client-lib' I have given the same name while
executing the command ; is this right?
As you can see in the error ; it describes ; file -
helloendpoints/./war/WEB-INF/appengine-web.xml could not be located.
The file is indeed available in my application, but is located in a
different directory(indeed in 3 locations) ; What should I do here?
./src/main/webapp/WEB-INF/appengine-web.xml
./target/generated-sources/appengine-endpoints/WEB-INF/appengine-web.xml
./target/helloendpoints-1.0-SNAPSHOT/WEB-INF/appengine-web.xml
The documentation suggest me to edit 'web.xml' file. But the file is
available in 3 location and am not sure which one I have to edit(I
have edited the file in 3rd location)
./src/main/webapp/WEB-INF/web.xml
./target/generated-sources/appengine-endpoints/WEB-INF/web.xml
./target/helloendpoints-1.0-SNAPSHOT/WEB-INF/web.xml
I am finding it quite difficult to resolve this issue ; as there is no other documentation (or) examples available in web other than the Google official documentation.
Would appreciate if some-one can help me to resolve this. Thank you.
you just need to make sure that, you directory exist and that you have the required files into the directories. I can also use the maven goal to make the generation, I read a complete article on the issue here. http://thenavigatorme.blogspot.com/2014/05/how-to-resolve-google-cloud-endpoints.html
Hope this helps.
I'm trying to create a new Google App Engine application.
Within a brand new Android project, I added an App Engine project and all seems well. Now when trying to generate an endpoint for a class via Google > Generate Cloud Endpoint it has a number of Unexpected Exception.
Here are some of the exceptions.
java.lang.IllegalArgumentException: Project MyApp is not a web-app project
and
org.eclipse.core.runtime.CoreException: MyApp is not configured as a web application
This doesn't seem to make sense, it's an Android app but I may be mistaken with how it should act.
How do I resolve these errors with Eclipse
I figure someone else is bound to make the same bonehead mistake I did, so I'll answer my own question instead of deleting my shame in case it can help others.
Basically this error message happens when following https://developers.google.com/eclipse/docs/endpoints-addentities and you generate the endpoint class in the wrong project.
When you create a Google App Engine powered Android app, you will have at least two projects: MyApp and MyApp-AppEngine. You need to put your entity class into the MyApp-AppEngine project and NOT your MyApp project.
If you place your class within MyApp and generate the endpoint classes that way, you'll end up confusing Java / Eclipse / yourself / etc. It will then give you the errors
java.lang.IllegalArgumentException: Project MyApp is not a web-app project
and
org.eclipse.core.runtime.CoreException: MyApp is not configured as a web application