I'm trying to understand a bit more about the JIT compiler optimization. Is this optimization automatically enabled? Why wouldn't I want this option enabled?
This is my manifest sdk target:
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="15" />
By default the JIT compiler optimizations are enabled which means the default vmSafeMode is set to "false", so by setting it to "true" you are turning off the JIT compiler.
Of course if the device is running an OS under API level 8 (froyo) which doesn't support JIT; it shouldn't make any difference.
(sources:)
embedded-vm-control from the Android open source project
Android 2.2 notes from developer.android.com
The JIT compiler can be disabled on a per-application basis ,default value is false for android:vmSafeMode by adding
android:vmSafeMode="true" in the application
tag in AndroidManifest.xml This can be useful if you
suspect that JIT compilation is causing your application to behave
incorrectly.
I hope this will help to understand more about android:vmSafeMode
Related
I run ./gradlew :app:lint task to generate a report.
One of them is Media Capabilities property not specified:
../../src/main/AndroidManifest.xml:6: The app accesses MediaStore.Video, but is missing a tag with a android.content.MEDIA_CAPABILITIES declaration
3 xmlns:tools="http://schemas.android.com/tools"
4 package="com.example.myapp">
5
6 <application
7 android:name=".App"
8 android:allowBackup="false"
9 android:icon="#mipmap/ic_launcher"
In Android 12 and higher, an app that opens media files should explicitly specify media formats that it doesn't support, so the OS can provide a transcoded file instead.
To suppress this error, use the issue id "MediaCapabilities" as explained in the Suppressing Warnings and Errors section.
How to fix it?
I am not using any media capabilities in my app, and will still get this lint issue.
I simply suppressed the error to "fix" it. Seems like a false positive with Android Lint.
<application
tools:ignore="MediaCapabilities">
</application>
We're getting the same warning and we don't have any video in our app - at least directly. I found this bug report, they state that it might be from a library you're using. Until a better solution has been made by Google I think the best would be to just ignore it (as suggested by Marius Kohmann) if you're certain you're not using video in your app.
I have an old Adobe AIR app that is working just fine on Android, except that it comes out in portrait mode. Without changing the source, just the application descriptor, I would like to fix this. Currently I have:
<application xmlns="http://ns.adobe.com/air/application/2.6">
...
<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="preferExternal">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<supports-screens android:normalScreens="true"/>
<application android:enabled="true">
...
Now, if I add this:
<initialWindow>
<aspectRatio>landscape</aspectRatio>
</initialWindow>
...within the inner <application> tag, ADT says:
application.xml: error 402: Current Android sdk version doesn't support initialWindow as xml tag
I tried changing the AIR version (yes, see AIR vs Android below) up to 3.9 with no difference.
If I put it within only the outer <application> I get this error instead:
application.xml(24): error 103: application.initialWindow is an unexpected element/attribute
So I'm guessing I have it in the right spot, but I need to add a version number.
However, after a bit of searching, I could not find documented anywhere which Android SDK version I would need to specify (using "the -platformsdk flag in the ADT command if the element was introduced after Android 2.2").
AIR vs Android
This <initialWindow> thing isn't actually an Android XML tag, but an Adobe XML tag, contrary to Adobe's documentation which says that child elements of the <manifest> tag are "Defined by the Android SDK." (Search for <initialWindow> and you'll find only Adobe AIR docs, not Android SDK docs. Which is too bad, because the latter are pretty good at telling you exactly which version an element was introduced in.)
Update 1: SDK 23.0.1 isn't new enough?
I added the -platformsdk option pointing to the Android SDK, which then complained about missing aadt.exe. Per https://stackoverflow.com/a/16831707 I copied in that from 23.0.1 under build-tools. I still get the same message. I also tried adding within the <manifest> tag <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23" />, still the same result.
UPDATE 2: Compiled AndroidManifest.xml has lower Android SDK version!
Using aapt from the Android SDK, I found out that the AIR-made APK, despite the above line in Update 1, contains this:
E: uses-sdk (line=48)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x9
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x13
Update 3: Also true with AIR SDK 19
Although with this difference:
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x17
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x17
Interestingly with SDK 19, the screen orientation is now also defined:
A: android:screenOrientation(0x0101001e)=(type 0x10)0x2
...but of course I want 0 (landscape), not 0x2 (user).
Maybe this could work
<android:screenOrientation="landscape">
I have not used Adobe air,this is just a suggestion
Actually, the initialWindow tag goes within the outermost application tag, as the docs say. At one point I had tried this and gotten an error, but I guess it was a coincidence with something else I was trying. I can confirm this fixes it on AIR 2.6, 3.9, and 19.
I am building a C Code to android using ndk in eclipse. I need to include libc library which requires me to set a TARGET_CPU_VARIANT. This is the error message precisely. I am using armeabi-v7a. What should I do?
TARGET_CPU_VARIANT not set or set to an unknown value.
Possible values are cortex-a7, cortex-a8, cortex-a9, cortex-a15, krait, denver.
Use generic for devices that do not have a CPU similar to any of the supported cpu variants
So I have been developing an app for android and iOS for quite a while. Today was supposed to be the submission day! I have been doing all my android testing on a Samsung Galaxy S4 with Android 4.4.2.
I have been using Ti SDK 3.2.1 during this whole process. I've noticed there has been an update wanting to update titanium the past week or two but I have been ignoring it until I get this release out.
So today I am doing my final tests and my login screen now shows no text. I can type in the inputs and work all my buttons, just no text is visible.
The console is also throwing some new errors that just started showing today:
[WARN] : linker: libstlport_shared.so has text relocations. This is wasting memory and is a security risk. Please fix.
[WARN] : linker: libkroll-v8.so has text relocations. This is wasting memory and is a security risk. Please fix.
[WARN] : linker: libtiverify.so has text relocations. This is wasting memory and is a security risk. Please fix.
[WARN] : ApplicationPackageManager: getCSCPackageItemText()
[WARN] : V8Object: Runtime disposed, cannot set property 'userAgent'
[ERROR] : ViewSystem: ViewRootImpl #2 Surface is not valid.
Those weird "linker" errors. This just started showing today. So I try and remedy the problem by updating to that new Ti SDK 3.2.2. I get through that, update all the android SDKs, update the android NDK and still, same thing.
I've cleaned the project, removed it entirely from the phone, rebooted the phone, my computer and so on.
I can however see the text on an older android device that I have. It is n samsung galaxy stellar and when I compile I do not get those errors.
Can anyone think of what is going on here and WHY it just started happening today after no SDK updates?
I can type in the two fields no problem. I cant see any of the text. Also, the text on my button magically disappeared.
EDIT 2
I am thinking this has something to do with the screen density setting in tiapp.xml
if I change:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<uses-sdk android:targetSdkVersion="11"/>
<supports-screens android:anyDensity="false"
android:largeScreens="true" android:normalScreens="true"
android:smallScreens="true" android:xlargeScreens="true"/>
</manifest>
</android>
to this:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<uses-sdk android:targetSdkVersion="11"/>
<supports-screens android:anyDensity="true"
android:largeScreens="true" android:normalScreens="true"
android:smallScreens="true" android:xlargeScreens="true"/>
</manifest>
</android>
my text reappears. Other elements on the screen now appear smaller though..yay android...
Can you post some of your code for the text fields? Can't help you troubleshoot with just the error messages and tiapp.xml.
Also, I would try deleting the build folder in your workspace. Then for good measure just do a 'Project'->'Clean' command and run again.
I'm building a c project in Eclipse-android and get the following error:
This is a ndk build error (independent to my code)
/Users/eladb/MyWorkspace/android-ndk-r8e/build/gmsl/__gmsl:512: *** non-numeric second argument to 'wordlist' function: ''. Stop.
tried
android-ndk-r8b
android-ndk-r8e
how can I fix this?
This is a known problem due to the r8d NDK not picking up properly the android:minSdkVersion property from the AndroidManifest.xml.
To work around that issue change the line 512 of the file /android-ndk-r8d/build/gmsl/__gmsl to:
int_encode = $(__gmsl_tr1)$(wordlist 1,$(words $1),$(__gmsl_input_int))
In your AndroidManifest, add the following line:
<uses-sdk android:minSdkVersion="3" />
This fixed the problem for me. You generally get this when importing a project you downloaded, as newly generated projects don't have that kind of error.
For information, this issue is also reproductible from the command-line.
Looks like the XML parsing code in ndk-build is sensitive to whitespace (as of r8e.) I was getting this error when I had the following line in my manifest:
<uses-sdk android:minSdkVersion ="10" android:targetSdkVersion="11" />
The problem went away when I replaced it with the following line, removing the whitespace between minSdkVersion and the = sign:
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="11" />
Ugh.
It's debatable whether you should patch the ndk (as described in the accepted answer) or do a workaround on the application side. I chose the workaround, as I work on a team with several different environments where we need to build, including a shared CI server, and I didn't want to go around patching the ndk for each environment and for each new developer. If you work solo, the accepted answer may be more appropriate as it will be fixed for your future projects as well.
Try to change your file carriage control (\r\n) to linux format (\n)
To fix this, I edited the file in vi and did a "set filetype=unix"
just got into the same issue
"....android-ndk-r12b/build/gmsl/__gmsl:512: *** non-numeric second argument to `wordlist' function: '18e'. Stop."
if you get this 18e, the e can be anything this is because that in the Application.mk you added a letter to the APP_PLATFORM
"APP_PLATFORM := android-18e"
and it should be
"APP_PLATFORM := android-18"
with no letter in the end, this solve the misstype which by the way i don't know when and how it has been added as i didn't open this file for weeks now, STRANGE !
Update your NDK to r15b or latter. For me its work.