android-10 target
No resource found that matches the given name 'android:Theme.Holo.Light'.
This is apparently because It needs a Honeycomb target number.
android-15 target
AppDetailsActivity.java:20: package android.support.v4.app does not exist
I found this link with the same problem:
http://groups.google.com/group/android-building/browse_thread/thread/9ae77ba4b24407db
But after adding the three lines suggested to Android.mk I still get the same errors.
The thread references the library as android.support.v4 but the original Android.mk shows android-support-v4. Does this have anything to do with the error?
Naturally, Android Support Package has been installed.
What SDK version should I be targeting?
edit:
I think I got this working by copying ~/android-sdk-linux/extras/android/support/v4/android-support-v4.jar to the lib folder in the project directory.
Without this link I would not have been able to get it fixed in a timely manner:
http://myandroidnote.blogspot.com/2011/04/using-fragment-of-android-compatibility.html
edit:
Please see first post.
Related
Hello all,
So I've made an application, for android but when I try to install it on my phone it gives an error, "Application could not be installed" or something like that.
I think it's a signing issue. If I sign it with apk manager it works great, but since I want to upload it on the market I had to sign it with jarsigner.
I used this tutorial:
http://www.simply-android.com/discu...an-app-inventor-app-on-the-android-market./p1
Any suggestions?
I also tried signing with eclpise/adt, same error.
So, I just used this command to verify the sign was ok:
Code:
jarsigner.exe -verify -verbose -certs apkname.apk
I get some files that have this:
Code:
[CertPath not validated: null]
Then on last lines:
Code:
jar verified
Warning:
This jar contains entries whose certificate chain is not validated
Any help appreciated!
Nobody knows? I really need some help with this, since I can't upload the app on the market because of this issue.
What am I doing wrong? I did use the correct commands to sign it, so I don't understand why there is an error when trying to install the apk from the SD card...
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
It is very tricky to find info on the usage with 1.7, but once found it is reasonable simple:
For keytool include
-sigalg SHA1withDSA -keyalg DSA -keysize 1024For jarsigner include
-sigalg SHA1withDSA -digestalg SHA1
(1024 is the maximum and works, less might do the trick)
Trying to compile some samples from the Android SDK.
I just took the AccelerometerPlay example, ran the command:
Code:
android update project -p . -t 1
which creates the Ant build file, then
Code:
ant release
which builds release APK files.
The problem is, if I add something like:
Code:
import android.util.Slog;
to the .java file, the build fails, claiming that it can't find the file (even though it exists in {sdk_path}/sources/android-15
I'm guessing that it looks for .class files inside {sdk_path}/platforms/android-15/android.jar , where android/util/Slog.class doesn't exist.
How do I get this build to work?
I've tried adding
Code:
<src path="${sdk.dir}/sources/android-15" />
under the <javac> task in {sdk_dir}/tools/ant/build.xml, but it seems to throw out more errors, whilst also appearing to try to compile every single .java file there.
I'm new to Java so really don't know what I'm doing - can anyone please point me in the correct direction?
Thanks.
Anyone have any idea?
If you're new to Java, you may want to give Eclipse a try. You won't have to mess around with Ant too much and it will help you with your syntax/imports.
From your description, it looks like you'll want to add the .jar file you mentioned to the 'classpath' attribute of the <javac> element in your ant XML file.
- chris
Thanks for the reply cttttt.
What .jar file are you referring to? android.jar? Because that doesn't have the classes as far as I know.
Eclipse gets me even less further - I can't seem to install the ADT plugin at all. On Eclipse 3.7.2, it throws the WST error, and when I try the solutions "that work", I get thrown network errors.
(so at least I can get a build actually going with Ant)
Hi All,
I'm having a problem with building an Android ROM (galaxys2att, gingerbread). I decided it was time to get smarter about makefile processing. So I created a simple test project to play with. But it's not getting compiled. Here's what I did:
1. I create a directory ("myproject") under a buildable module (I used Mms but others had the same problem).
2. I create Android.mk in that directory containing
hello:echo "Hello from myproject"3. I ran "mm" in the Mms directory.
Mms and other subproject compiled but no evidence of myproject.
Android.mk in Mms contained line
include $(call all-makefiles-under, $(LOCAL_PATH))
Of course I ran "envsetup.sh" originally.
What am I missing here?
Thanks
-John
Hi guys,
Sorry in advance if I posted this to the wrong place as I am not allowed to post into Android devs-only forum.
I am currently investigating the extra fields flaw in apk signature verification discovered in juli 2013 by trying to replicate it on the AVD.
First of all...this is research only as I am trying to understand my system's internals and especially permissions handling.
What i try to achieve is to root the AVD by using the elevated permissions of a apk signed with the platform key.
1. I have an apk signed with the platform key from my cyanogenmod 10.2 device and a classes.dex with size under 65k that will try to install SuperSU on my AVD
2. When creating a new apk I put the original classes.dex into the extras field of the corresponding ZIP entry and pad it to have a size of 65533
3. The rooting classes.dex goes into the data field of the ZIP entry and extra lengh is set to 65533 or -3 as seen by the buggy verifier. This classes.dex is also padded to have the exact size of the original classes.dex
4. My MainActivity tries to install the just assembled apk
Expected result: As the verifier is validating the original classes by jumping 3 backwards instead of 65533 forward the apk should be installed having elevated system privileges.
Actual result: AVD refuses installation of the apk with error code -103 as the "digest of classes.dex does not match those in the apk".
My thoughts on what may cause this:
A) I know that google merged the fix for this bug into HEAD but it still should work on AVD 2.3 and 4.1.
Or are all versions of AVD patched agains extras field expliotation? As I update my APIs everyday the fix is likely to be in my AVD.
Correct me if i am wrong.
B) As I use a cyanogenmod 10.2 apk as the base the platform keys may not match those of the AVD.
If so the error should be different to -103 but something like "system user signature does not match"
Please would someone point me into the right direction?
Hi,
I own a note 2 device where I've installed Cyanogenmod (version 11-20140827-nightly-n7100). I've been trying to mod the original stock camera from samsungs firmware (4.4 kitkat) to run on cyanogenmod with some success but now I'm stuck witch a dependency problem I don't know how to resolve and not even why it is possible. So here is a list of what i did, yet:
- using apktool and smali/backsmali to create deodexed SamsungCamera.apk.
- adding the library dependencies mentioned in androidmanifest.xml in the apktool decompiled folder
- searched for LoadLibrary calls in the smali code to find out that seccamera_jni.so is loaded at runtime
problem: the dependency tree of seccamera_jni.so is incompatible with the libs installed on cyanogenmod -> missing symbols for the Camera(->crash) versus missing symbols for the system (bootloop)
sollution: take seccamera_jni.so and all other libs from the stock ROM it (recursively) depends on and rename the files and their internal dependencies to something like lsb**.so instead of lib**.so.
- write a c progam that implements this sollution
- install everything on the phone and fix the permissions
- run SamsungCamera
results: While the described method removes all library not found issues while retaining the original libs of cyanogenmod i still get one f*ing symbol not found error message:
"java.lang.UnsatisfiedLinkError: dlopen failed could not load "lsbnativehelper.so" needed by "libseccamera_jni.so"; caused by [..endless chain leading to libc.so] Missing Symbol __cxa_finalize in lsbdl.so needed by lsbc.so"
I've looked it up: libdl.so has no external dependencies and refers to __cxa_finalize which is implemented in libc.so which has libdl.so as its only dependency.
So my Questions are: How is this possible? I've checked the libc.so integrated in cyanogenmod and even this one has the same dependencies in libc.so but if this was a problem how could any app using libc work on that system? What is different on the stock room that it won't get the missing symbol even though it has the missing dependency? what am I overlooking?