I am getting the bellow error while running. I created the map-key also.
ERROR MSG:
12-06 13:07:02.230: E/AndroidRuntime(527): Uncaught handler: thread main exiting due to uncaught exception
12-06 13:07:02.249: E/AndroidRuntime(527): java.lang.IllegalAccessError: cross-loader access from pre-verified class
12-06 13:07:02.249: E/AndroidRuntime(527): at dalvik.system.DexFile.defineClass(Native Method)
12-06 13:07:02.249: E/AndroidRuntime(527): at dalvik.system.DexFile.loadClass(DexFile.java:193)
12-06 13:07:02.249: E/AndroidRuntime(527): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
12-06 13:07:02.249: E/AndroidRuntime(527): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
12-06 13:07:02.249: E/AndroidRuntime(527): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
12-06 13:07:02.249: E/AndroidRuntime(527): at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
12-06 13:07:02.249: E/AndroidRuntime(527): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316)
12-06 13:07:02.249: E/AndroidRuntime(527): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
12-06 13:07:02.249: E/AndroidRuntime(527): at android.app.ActivityThread.access$2100(ActivityThread.java:116)
12-06 13:07:02.249: E/AndroidRuntime(527): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
12-06 13:07:02.249: E/AndroidRuntime(527): at android.os.Handler.dispatchMessage(Handler.java:99)
12-06 13:07:02.249: E/AndroidRuntime(527): at android.os.Looper.loop(Looper.java:123)
12-06 13:07:02.249: E/AndroidRuntime(527): at android.app.ActivityThread.main(ActivityThread.java:4203)
12-06 13:07:02.249: E/AndroidRuntime(527): at java.lang.reflect.Method.invokeNative(Native Method)
12-06 13:07:02.249: E/AndroidRuntime(527): at java.lang.reflect.Method.invoke(Method.java:521)
12-06 13:07:02.249: E/AndroidRuntime(527): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
12-06 13:07:02.249: E/AndroidRuntime(527): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
12-06 13:07:02.249: E/AndroidRuntime(527): at dalvik.system.NativeStart.main(Native Method)
This is good Example of Map
And i think this is right a way to get key ::
To get certificate fingerprint (MD5) follow the simple steps below:
You need to get the keystore file for getting the certificate fingerprint (MD5).
Your keystore file can be found at the following path
"C:\Documents and Settings\\Local Settings\Application Data\Android"
(Or)
"C:\Documents and Settings\.android"
Keystore file name is "debug.keystore" file.
Copy the "debug.keystore" file to some other folder (ex: - "D:\Androidkeystore\") (its user friendly to use).
Open command Prompt and go to the Java installed directory. ("C:\Program Files\Java\\bin")
Then type the below line (given in box) and press enter.
keytool.exe -list -alias androiddebugkey -keystore "D:\AndroidKeystore\debug.keystore" -storepass android -keypass android
Here the MD5 certificate fingerprint is "64:88:A2:FC:AA:9F:B1:B0:CA:E4:D0:24:A8:1E:77:FB"
this is working actually........but im getting small error here
this is my path-C:\ANDROID\Java\jdk1.6.0\bin>keytool.exe -list -alias androiddebugkey -keystore"C:\ANDROID\debugkey\debug.keystore"-storepass android -keypass android
keytool error: java.lang.RuntimeException: Usage error, android is not a legal c
ommand
and finally i have solve from here ::
For more ..
as you got fingerprints copy it and past in Sign Up page. you got a key successfully
Ifyour key is correct, it might be a missing <uses-library android:name="com.google.android.maps" /> in the manifest. You have to add this line in the application tag before defining the activitys.
make sure that you are using debug key not release key.
Related
I'm trying to use PJSIP library for my Android application.
I built pjsua sample application according to this manual:
https://trac.pjsip.org/repos/wiki/Getting-Started/Android
But when sample application is launching, exception triggers:
12-06 15:03:58.043: D/dalvikvm(628): Trying to load lib /data/data/org.pjsip.pjsua2.app/lib/libpjsua2.so 0x4129d980
12-06 15:03:58.064: W/dalvikvm(628): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/pjsip/pjsua2/app/MyApp;
12-06 15:03:58.064: D/AndroidRuntime(628): Shutting down VM
12-06 15:03:58.064: W/dalvikvm(628): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
12-06 15:03:58.083: E/AndroidRuntime(628): FATAL EXCEPTION: main
12-06 15:03:58.083: E/AndroidRuntime(628): java.lang.ExceptionInInitializerError
12-06 15:03:58.083: E/AndroidRuntime(628): at org.pjsip.pjsua2.app.MainActivity.onCreate(MainActivity.java:85)
12-06 15:03:58.083: E/AndroidRuntime(628): at android.app.Activity.performCreate(Activity.java:4465)
12-06 15:03:58.083: E/AndroidRuntime(628): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
12-06 15:03:58.083: E/AndroidRuntime(628): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
12-06 15:03:58.083: E/AndroidRuntime(628): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
12-06 15:03:58.083: E/AndroidRuntime(628): at android.app.ActivityThread.access$600(ActivityThread.java:123)
12-06 15:03:58.083: E/AndroidRuntime(628): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
12-06 15:03:58.083: E/AndroidRuntime(628): at android.os.Handler.dispatchMessage(Handler.java:99)
12-06 15:03:58.083: E/AndroidRuntime(628): at android.os.Looper.loop(Looper.java:137)
12-06 15:03:58.083: E/AndroidRuntime(628): at android.app.ActivityThread.main(ActivityThread.java:4424)
12-06 15:03:58.083: E/AndroidRuntime(628): at java.lang.reflect.Method.invokeNative(Native Method)
12-06 15:03:58.083: E/AndroidRuntime(628): at java.lang.reflect.Method.invoke(Method.java:511)
12-06 15:03:58.083: E/AndroidRuntime(628): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
12-06 15:03:58.083: E/AndroidRuntime(628): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
12-06 15:03:58.083: E/AndroidRuntime(628): at dalvik.system.NativeStart.main(Native Method)
12-06 15:03:58.083: E/AndroidRuntime(628): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1285]: 37 cannot locate 'rand'...
12-06 15:03:58.083: E/AndroidRuntime(628): at java.lang.Runtime.loadLibrary(Runtime.java:370)
12-06 15:03:58.083: E/AndroidRuntime(628): at java.lang.System.loadLibrary(System.java:535)
12-06 15:03:58.083: E/AndroidRuntime(628): at org.pjsip.pjsua2.app.MyApp.<clinit>(MyApp.java:235)
It seems like appl cannot load libpjsua2.so library. I have never used the NDK before, so i don't have any ideas about this issue, please help me...
This happens if you've built your native components with the android-21 target, but are trying to run it on a device with an older Android version. Unless you take very special care, you can't run binaries built with the android-21 target on older devices. For basic C functions, it shouldn't matter which target version between android-3 and android-20 you use, it should work on all of them, but if you use android-21 it only works on that version and newer.
See https://stackoverflow.com/a/27093163/3115956 for more details on this issue.
mstorsjo answers my question. But i want write one comment:
I had correct properties files, but during pjsip building I found following logs:
sip#ubuntu:~/pjsip/trunk$ ./configure-android
configure-android: APP_PLATFORM not specified, using android-21
configure-android: TARGET_ABI not specified, using armeabi
So if you want compile the project on some specific platform version, you have to set APP_PLATFORM parameter for configure-android script.
TARGET_ABI=armeabi-v7a APP_PLATFORM=android-8 ./configure-android --use-ndk-cflags
I have encountered this when using HUAWEI phone with opus and pngquant jni library for android.
Finally the solution is that I add rand,srand and atof function implementions in my source file. Then the problem gone.
Solution from https://github.com/cocos2d/cocos2d-x/issues/15234
Try it!
static u_long myNextRandom = 1;
double atof(const char *nptr)
{
return (strtod(nptr, NULL));
}
int rand(void)
{
return (int)((myNextRandom = (1103515245 * myNextRandom) + 12345) % ((u_long)RAND_MAX + 1));
}
void srand(u_int seed)
{
myNextRandom = seed;
}
This is my manifest, it works fine in the official dashclock app but not in any other plugin host (i tested sidebar plus and a few similar apps). i always get the same error in logcat: caller is not official dashclock app and extension is not worldReadable.
<service
android:name=".DashClockService"
android:icon="#drawable/ic_dashclock"
android:label="#string/app_name"
android:permission="com.google.android.apps.dashclock.permission.READ_EXTENSION_DATA" >
<intent-filter>
<action android:name="com.google.android.apps.dashclock.Extension" />
</intent-filter>
<meta-data android:name="protocolVersion" android:value="2" />
<meta-data android:name="worldReadable" android:value="true" />
<meta-data android:name="description" android:value="#string/extension_description" />
<meta-data android:name="settingsActivity" android:value=".DashClockSettingsActivity" />
</service>
EDIT: Here is the log.
12-06 14:41:32.667: W/System.err(1735): java.lang.NullPointerException
12-06 14:41:32.683: W/System.err(1735): at com.google.android.apps.dashclock.api.DashClockExtension.publishUpdate(DashClockExtension.java:354)
12-06 14:41:32.683: W/System.err(1735): at com.myapp.DashClockService.update(DashClockService.java:126)
12-06 14:41:32.683: W/System.err(1735): at com.myapp.DashClockService.onCreate(DashClockService.java:41)
12-06 14:41:32.687: W/System.err(1735): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2573)com.myapp12-06 14:41:32.687: W/System.err(1735): at android.app.ActivityThread.access$1700(ActivityThread.java:145)
12-06 14:41:32.687: W/System.err(1735): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1489)
12-06 14:41:32.687: W/System.err(1735): at android.os.Handler.dispatchMessage(Handler.java:102)
12-06 14:41:32.687: W/System.err(1735): at android.os.Looper.loop(Looper.java:137)
12-06 14:41:32.687: W/System.err(1735): at android.app.ActivityThread.main(ActivityThread.java:5062)
12-06 14:41:32.691: W/System.err(1735): at java.lang.reflect.Method.invokeNative(Native Method)
12-06 14:41:32.691: W/System.err(1735): at java.lang.reflect.Method.invoke(Method.java:515)
12-06 14:41:32.691: W/System.err(1735): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
12-06 14:41:32.691: W/System.err(1735): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
12-06 14:41:32.691: W/System.err(1735): at dalvik.system.NativeStart.main(Native Method)
12-06 14:41:32.953: E/DashClockExtension(1735): Caller is not official DashClock app and this extension is not world-readable.
12-06 14:41:32.960: W/Binder(1735): Caught a RuntimeException from the binder stub implementation.
12-06 14:41:32.960: W/Binder(1735): java.lang.SecurityException: Caller is not official DashClock app and this extension is not world-readable.
12-06 14:41:32.960: W/Binder(1735): at com.google.android.apps.dashclock.api.DashClockExtension$1.onInitialize(DashClockExtension.java:289)
12-06 14:41:32.960: W/Binder(1735): at com.google.android.apps.dashclock.api.internal.IExtension$Stub.onTransact(IExtension.java:52)
12-06 14:41:32.960: W/Binder(1735): at android.os.Binder.execTransact(Binder.java:404)
12-06 14:41:32.960: W/Binder(1735): at dalvik.system.NativeStart.run(Native Method)
To add some additional info:
The Extension shows up as available, but it won't update or initialize.
The service is running.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I moved an Eclipse-based Android project from another machine to the machine that I am working with. I imported the project using Android Project from Existing Source. Everything is working well when I code but when I deploy it using emulators and phones, it's producing weird exceptions. What might be the problem?
I have attached the exceptions produced with the questions for information.
12-06 08:15:20.957: E/AndroidRuntime(767): FATAL EXCEPTION: main
12-06 08:15:20.957: E/AndroidRuntime(767): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.innolabmm.discoverlioncity/com.innolabmm.discoverlioncity.FeedActivity}: java.lang.ClassNotFoundException: Didn't find class "com.innolabmm.discoverlioncity.FeedActivity" on path: /data/app/com.innolabmm.discoverlioncity-1.apk
12-06 08:15:20.957: E/AndroidRuntime(767): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
12-06 08:15:20.957: E/AndroidRuntime(767): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
12-06 08:15:20.957: E/AndroidRuntime(767): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-06 08:15:20.957: E/AndroidRuntime(767): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
12-06 08:15:20.957: E/AndroidRuntime(767): at android.os.Handler.dispatchMessage(Handler.java:99)
12-06 08:15:20.957: E/AndroidRuntime(767): at android.os.Looper.loop(Looper.java:137)
12-06 08:15:20.957: E/AndroidRuntime(767): at android.app.ActivityThread.main(ActivityThread.java:5041)
12-06 08:15:20.957: E/AndroidRuntime(767): at java.lang.reflect.Method.invokeNative(Native Method)
12-06 08:15:20.957: E/AndroidRuntime(767): at java.lang.reflect.Method.invoke(Method.java:511)
12-06 08:15:20.957: E/AndroidRuntime(767): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-06 08:15:20.957: E/AndroidRuntime(767): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-06 08:15:20.957: E/AndroidRuntime(767): at dalvik.system.NativeStart.main(Native Method)
12-06 08:15:20.957: E/AndroidRuntime(767): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.innolabmm.discoverlioncity.FeedActivity" on path: /data/app/com.innolabmm.discoverlioncity-1.apk
12-06 08:15:20.957: E/AndroidRuntime(767): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
12-06 08:15:20.957: E/AndroidRuntime(767): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-06 08:15:20.957: E/AndroidRuntime(767): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-06 08:15:20.957: E/AndroidRuntime(767): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
12-06 08:15:20.957: E/AndroidRuntime(767): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
12-06 08:15:20.957: E/AndroidRuntime(767): ... 11 more
Try this:
Go to Project/Properties/Java Build Path/Order and Export -- Make sure there's a check in front of Android Dependencies and the support library, if you use it.Mark all checkboxes and Click on Apply and clean the project.
Hope this helps.
When I run a project created using forcedroid, I am getting following error in logcat of my ADT.
12-06 05:57:48.176: D/HttpAccess:constructor(833): User-Agent string: SalesforceMobileSDK/2.1.0 android mobile/4.2.2 (sdk) moapp/1.0 Hybrid
12-06 05:57:48.876: I/SalesforceDroidGapActivity.onCreate(833): onCreate called
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): No user account found
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): com.salesforce.androidsdk.rest.ClientManager$AccountInfoNotFoundException: No user account found
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at com.salesforce.androidsdk.rest.ClientManager.peekRestClient(ClientManager.java:140)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at com.salesforce.androidsdk.ui.sfhybrid.SalesforceDroidGapActivity.onCreate(SalesforceDroidGapActivity.java:118)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at android.app.Activity.performCreate(Activity.java:5104)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at android.os.Handler.dispatchMessage(Handler.java:99)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at android.os.Looper.loop(Looper.java:137)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at android.app.ActivityThread.main(ActivityThread.java:5041)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at java.lang.reflect.Method.invokeNative(Native Method)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at java.lang.reflect.Method.invoke(Method.java:511)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-06 05:57:49.026: I/ClientManager:peekRestClient(833): at dalvik.system.NativeStart.main(Native Method)
12-06 05:57:49.146: D/dalvikvm(833): GC_CONCURRENT freed 279K, 13% free 2623K/3004K, paused 27ms+24ms, total 192ms
12-06 05:57:49.296: I/SalesforceDroidGapActivity.onResumeNotLoggedIn(833): Should authenticate / online - authenticating
12-06 05:57:49.296: I/SalesforceDroidGapActivity.authenticate(833): authenticate called
12-06 05:57:49.296: I/ClientManager:getRestClient(833): No account of type com.salesforce.androisdk found
12-06 05:57:49.936: D/gralloc_goldfish(833): Emulator without GPU emulation detected.
12-06 05:57:50.096: E/Trace(857): error opening trace file: No such file or directory (2)
12-06 05:57:51.318: D/HttpAccess:constructor(857): User-Agent string: SalesforceMobileSDK/2.1.0 android mobile/4.2.2 (sdk) mobilapp/1.0 Hybrid
12-06 05:58:09.306: D/LockChecker:run(833): isLocked:true elapsedSinceLastActivity:20 timeout:0
My json.config file looks like this
{
"remoteAccessConsumerKey": "3MVG9Iu66FKeHhINkB1l7xt7kR8czFcCTUhgoA8Ol2Ltf1eYHOU4SqQRSEitYFDUpqRWcoQ2.dBv_a1Dyu5xa",
"oauthRedirectURI": "testsfdc:///mobilesdk/detect/oauth/done",
"oauthScopes": ["web", "api"],
"isLocal": false,
"startPage": "helloWorld",
"errorPage": "error.html",
"shouldAuthenticate": true,
"attemptOfflineLoad": false,
"androidPushNotificationClientId": ""
}
Please help me to resolve this error
I had the same problem. You need to set manifestmerger.enabled=true in your project.properties in order to merge the manifest file from salesforceSDK.
The AuthenticatorService from that manifest fixes the problem.
i am using ImageMagick in my project, I get it from guthub. After editing some code from there, when I compile this I am getting this error:
12-06 11:26:08.976: E/AndroidRuntime(1800): java.lang.ExceptionInInitializerError
on this line of code:
final MagickImage img = new MagickImage(new ImageInfo("/sdcard/image.jpeg"));
And this error:
12-06 11:26:08.976: E/AndroidRuntime(1800): Caused by: java.lang.UnsatisfiedLinkError: init
on this line of code:
System.loadLibrary("android-magick");
This is the logcat:
12-06 14:29:40.566: E/AndroidRuntime(4095): FATAL EXCEPTION: main
12-06 14:29:40.566: E/AndroidRuntime(4095): java.lang.ExceptionInInitializerError
12-06 14:29:40.566: E/AndroidRuntime(4095):at com.colors.photo.magic.AndroidMagickActivity.onCreate(AndroidMagickActivity.java:33)
12-06 14:29:40.566: E/AndroidRuntime(4095):at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-06 14:29:40.566: E/AndroidRuntime(4095):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
12-06 14:29:40.566: E/AndroidRuntime(4095):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
12-06 14:29:40.566: E/AndroidRuntime(4095):at android.app.ActivityThread.access$2300(ActivityThread.java:125)
12-06 14:29:40.566: E/AndroidRuntime(4095):at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
12-06 14:29:40.566: E/AndroidRuntime(4095):at android.os.Handler.dispatchMessage(Handler.java:99)
12-06 14:29:40.566: E/AndroidRuntime(4095):at android.os.Looper.loop(Looper.java:123)
12-06 14:29:40.566: E/AndroidRuntime(4095):at android.app.ActivityThread.main(ActivityThread.java:4627)
12-06 14:29:40.566: E/AndroidRuntime(4095):at java.lang.reflect.Method.invokeNative(Native Method)
12-06 14:29:40.566: E/AndroidRuntime(4095):at java.lang.reflect.Method.invoke(Method.java:521)
12-06 14:29:40.566: E/AndroidRuntime(4095):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-06 14:29:40.566: E/AndroidRuntime(4095):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-06 14:29:40.566: E/AndroidRuntime(4095):at dalvik.system.NativeStart.main(Native Method)
12-06 14:29:40.566: E/AndroidRuntime(4095): Caused by: java.lang.UnsatisfiedLinkError: init
12-06 14:29:40.566: E/AndroidRuntime(4095):at com.colors.photo.magic.Magick.init(Native Method)
12-06 14:29:40.566: E/AndroidRuntime(4095):at com.colors.photo.magic.Magick. <clinit>(Magick.java:37)
12-06 14:29:40.566: E/AndroidRuntime(4095): ... 14 more
Seems that native library was not found. Check your build environment. Of course you will need library compiled for proper CPU