After React Native Android rebuild, external images no longer show in Android - android

After I rebuilt my android folder (some settings got corrupted) images will not work (using Image React Native component). I'm not sure what the issue could be. Here is an error I'm getting:
E/MediaHTTPConnection: java.io.IOException: Canceled
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:172)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:144)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:106)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:400)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:333)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:483)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:429)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:560)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:293)
at android.media.MediaHTTPConnection.getSize(MediaHTTPConnection.java:466)
at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:151)
at android.os.Binder.execTransactInternal(Binder.java:1056)
at android.os.Binder.execTransact(Binder.java:1029)
To reiterate: I haven't changed the Image code at all. I think some deps auto-updated during the rebuild. It seems to be an okttp issue.

Related

How to stop AOSP from loading .so from vendor image

AOSP (android 8.0.0-r3) for Pixel XL, Im trying to stop Android from loading nfc_nci.marlin.so by
removed nfc_nci.marlin from device-marlin.mk
removed the source from system/nfc/halimpl/pn54x
After rebuild and flash to phone, I still notice from logcat :
sphal namespace is not configured for this process. Loading
/vendor/lib64/hw/nfc_nci.marlin.so from the current namespace instead.
Since I did not build nfc_nci.marlin.so, I did a search and found a hit in vendor/google_devices/marlin/proprietary/vendor.img. How can I stop the AOSP from loading this share library from vendor image??
Don't know if you have the same device tree as me, but you have to remove nfc_nci.marlin.so from PRODUCT_COPY_FILES in vendor/google/devices/marlin/marlin-vendor-blobs.mk, then manually from out(..)/vendor/lib(,64)/hw/ and rebuild the AOSP

Issue with projectfolder called (AndroidProjects)?

I have a wired issue. If i set up a folder called AndroidProjects and put my project in there... Android-Studio fails with gradle.
one error is:
IllegalStateException:
PsiFile not parsed for file D:/AndroidProjects/MyApplication/settings.gradle.
Wait until onPsiFileAvailable() is called.
sometimes it says that gradle has a fatal error....
if i set up my projectlocation to e.g. andropro everyting is working fine.
My thoughts:
may problems with 2 big letters in projectfoldername
may foldername is to long
may android or project are registered words in android-studio
Is there a knowen issue using foldernames like i did above?
couldn't find anything on the net.

Unsatisfied link error for native library

I developed applications which use native code. All of a sudden those are not working, giving error "Unsatisfied link error: Couldn't load native library from loader dalvik.System.pathClassLoader, findLibrary returned null. I restarted adt twice. Still getting the same error. Applications which are not using native code, are working fine.
The error implies that the program is not able to find the shared libraries that you would have created.
Which devices did you try it on ?
You can check once if they are available in libs directory of your app . [/data/data/app_id/lib ]. Also check if armv7 support is required and if the directory is there in the libs , is .so present there.
Now it's working. I deleted all my virtual devices and then created a new one. However it's showing "skipped 264 frames. application may be doing too much work on main thread" many times and whenever we press a button, displaying this message in log "error loading /system/media/audio/ui/Effect_Tick.ogg"
thanks.

Android-model load error

My Emacs version is 23.3.1, I am want to setup an android develop environment. I download android-mode.el
and modify .emacs to load it;
(add-to-list 'load-path "~/.emacs.d/site-lisp/")
(require 'android-mode)
(custom-set-variables
'(android-mode-avd "test")
'(android-mode-sdk-dir "/opt/android-sdk/"))
when loading that file, it has error:
Warning (initialization): An error occurred while loading `/home/htang/.emacs':
File error: Cannot open load file, cl-lib
I know the cl-lib is new feature since emacs24 or higher, how can I resolve this problem to make it work on my Emacs23.3 version?
You can install cl-lib (for older Emacsen) from GNU ELPA.

Applaud & Phonegap on Android

My issue is regarding PhoneGap and Android development using the Eclipse Applaud plugin. I downloaded and installed the Applaud plugin successfully. I can create a new project using the Applaud wizard (via the Eclipse toolbar icon), and the demo runs on the device fine. However, when I overwrite the existing html & js (only main.js, not phonegap.js) files, then build it to the device, the non device functionality works fine (button clicks/ui update/etc), but the PhoneGap commands such as (device.version/device.platform/etc) does not seem to work.
I have tried hooking this into the onDeviceReady event as well as making sure the .jar library is included, but I still have the same issue. So I guess my question is; when creating a PhoneGap solution using Applaud, does Eclipse need to compile and library, such as PhoneGap? and if so, how could someone go about doing such things?
Error Log:
01-24 14:59:44.567: W/KeyCharacterMap(5453): No keyboard for id 131074
01-24 14:59:44.567: W/KeyCharacterMap(5453): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
01-24 14:59:59.917: I/Web Console(5453): Failed to run constructor: TypeError: object is not a function at file:///android_asset/www/resources/js/phonegap-1.3.0.js:210
01-24 14:59:59.927: I/Web Console(5453): Failed to run constructor: TypeError: Cannot read property 'capture' of undefined at file:///android_asset/www/resources/js/phonegap-1.3.0.js:210
01-24 14:59:59.927: I/Database(5453): sqlite returned: error code = 14, msg = cannot open file at source line 25467
01-24 15:00:00.057: D/dalvikvm(5453): GC_CONCURRENT freed 1185K, 55% free 3188K/6983K, external 2630K/2814K, paused 2ms+3ms
So I'm back and have somehow fixed the issue I had (most likely by luck). When I started this project, I thought the best approach would be make this application as modular as possible; each functionality (web requests, file reading/writing, etc.) to be separated from one another. Thus I created lots of separate js files, each tagged with the appropriate name (network, device, language, etc.), and then included them in my index.html page which is then ran by phonegap.
In some of these files, I took the following approach:
var Device = {
// Returns the Device Name as a string.
Name: function() {
return window.device.name;
}
};
As a result, I could then access this functionality using the dot operator (which I prefer). However by doing so, resulted in many files relying one on another, making it difficult to track down my issue. After spending some time commenting and un-commenting functionality, It seems by using a combination of the above approach (dot operator) and my bad choice of naming conventions. The Device.Name() implementation above seemed to (not entirely certain on why/how) conflict with the PhoneGap libraries, consequently resulting in js errors on the device.
After changing the above name from "Device" to "Handset", my issue went away. A simple and maybe obvious solution to a painful afternoon.
I'll answer your question, but I don't think it is your problem:
Whether or not the AppLaud wizard just uses phonegap.jar or rebuilds its components depends upon how you use the project creation wizard.
If you use its "Built-in Phonegap" or point at a downloaded official release ("Enter path to installed PhoneGap"), it will just point at the phonegap.jar from that release. If you point at a directory with an unzipped github PhoneGap version, phonegap.jar will not be used and the PhoneGap Java sources will be built into your project. This makes for easy debugging of the PhoneGap implementation.
Regarding your problem, you likely have something wrong with your index.html file, like a misspelling of phonegap{...}.js. As ghostCoder says in the comments, you may need to share your code to get help on it.

Categories

Resources