Can't install apps with Eclipse ADT on my phone - android

I would like to install and debug projects using Eclipse ADT. It finds the device and trys to install but then I get the errors below.
The phone is a "HTC One S" and it is the Custom ROM "Codename Lungo One S" (4.3). The applications are the Kontalk project and the ApiDemos from the 17 (4.2.2) samples both build for 4.2.2.
Installing in the emulator works.
10-10 00:36:30.783: E/AndroidRuntime(2943): *** FATAL EXCEPTION IN SYSTEM PROCESS: main
10-10 00:36:30.783: E/AndroidRuntime(2943): java.lang.SecurityException: Neither user 2000 nor current process has android.permission.INSTALL_PACKAGES.
10-10 00:36:30.783: E/AndroidRuntime(2943): at android.os.Parcel.readException(Parcel.java:1431)
10-10 00:36:30.783: E/AndroidRuntime(2943): at android.os.Parcel.readException(Parcel.java:1385)
10-10 00:36:30.783: E/AndroidRuntime(2943): at android.content.pm.IPackageManager$Stub$Proxy.installPackageWithVerificationAndEncryption(IPackageManager.java:3314)
10-10 00:36:30.783: E/AndroidRuntime(2943): at com.android.commands.pm.Pm.runInstall(Pm.java:931)
10-10 00:36:30.783: E/AndroidRuntime(2943): at com.android.commands.pm.Pm.run(Pm.java:109)
10-10 00:36:30.783: E/AndroidRuntime(2943): at com.android.commands.pm.Pm.main(Pm.java:77)
10-10 00:36:30.783: E/AndroidRuntime(2943): at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
10-10 00:36:30.783: E/AndroidRuntime(2943): at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
10-10 00:36:30.783: E/AndroidRuntime(2943): at dalvik.system.NativeStart.main(Native Method)
10-10 00:36:30.793: E/JavaBinder(2943): Unknown binder error code. 0xfffffff7
10-10 00:36:30.793: E/ServiceManager(2943): error in getService
10-10 00:36:30.793: E/ServiceManager(2943): android.os.RemoteException: Unknown binder error code. 0xfffffff7
10-10 00:36:30.793: E/ServiceManager(2943): at android.os.BinderProxy.transact(Native Method)
10-10 00:36:30.793: E/ServiceManager(2943): at android.os.ServiceManagerProxy.getService(ServiceManagerNative.java:123)
10-10 00:36:30.793: E/ServiceManager(2943): at android.os.ServiceManager.getService(ServiceManager.java:55)
10-10 00:36:30.793: E/ServiceManager(2943): at android.app.ActivityManagerNative$1.create(ActivityManagerNative.java:1911)
10-10 00:36:30.793: E/ServiceManager(2943): at android.app.ActivityManagerNative$1.create(ActivityManagerNative.java:1909)
10-10 00:36:30.793: E/ServiceManager(2943): at android.util.Singleton.get(Singleton.java:34)
10-10 00:36:30.793: E/ServiceManager(2943): at android.app.ActivityManagerNative.getDefault(ActivityManagerNative.java:73)
10-10 00:36:30.793: E/ServiceManager(2943): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
10-10 00:36:30.793: E/ServiceManager(2943): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
10-10 00:36:30.793: E/ServiceManager(2943): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
10-10 00:36:30.793: E/ServiceManager(2943): at dalvik.system.NativeStart.main(Native Method)
10-10 00:36:30.793: E/AndroidRuntime(2943): Error reporting crash
10-10 00:36:30.793: E/AndroidRuntime(2943): java.lang.NullPointerException
10-10 00:36:30.793: E/AndroidRuntime(2943): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
10-10 00:36:30.793: E/AndroidRuntime(2943): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
10-10 00:36:30.793: E/AndroidRuntime(2943): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
10-10 00:36:30.793: E/AndroidRuntime(2943): at dalvik.system.NativeStart.main(Native Method)
Any ideas? Can't find anything on this on the internet?

You can try the
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
before the application tag is start in the AndroidManifest.xml.

I think you are looking for this but you can try clean and build your project first.

The problem is Codename Lungo with CM10.1 and CM10.2. This is a bug or at least you can't debug Apps with the standard procedure. It works on my phone with CL CM10 and CynogenMod 10.2.
Tim Veluwenkamp announced a new version of CL yesterday that may address the issue but I am not sure about it. I am on CM10.2 now.

Related

Speech + Audio Recording Same time (IllegalState Exception)

i have some problem when using device mic simuntaniously , When i have started mediarecorder for record audio and i am try to start recognizer intent for speech recognizer i am getting IllegalStateException start failed: -38
Logcat
AudioRecord: start() status -38
10-10 11:25:11.180 23074-23074/com.example.techno_110.recordaudio
D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN 10-10 11:25:11.280
23074-23074/com.example.techno_110.recordaudio E/MainActivity:
setUpMediaRecorder: =>> /storage/emulated/0/audiofile.3gpp 10-10
11:25:11.320 23074-23074/com.example.techno_110.recordaudio
E/MainActivity: start: ==> Started Audio Recording 10-10 11:25:11.380
23074-23074/com.example.techno_110.recordaudio E/MediaRecorder: start
failed: -38 10-10 11:25:11.380
23074-23074/com.example.techno_110.recordaudio W/System.err:
java.lang.IllegalStateException 10-10 11:25:11.380
23074-23074/com.example.techno_110.recordaudio W/System.err: at
android.media.MediaRecorder.start(Native Method) 10-10 11:25:11.380
23074-23074/com.example.techno_110.recordaudio W/System.err: at
com.example.techno_110.recordaudio.MainActivity.start(MainActivity.java:313)
10-10 11:25:11.380 23074-23074/com.example.techno_110.recordaudio
W/System.err: at
com.example.techno_110.recordaudio.MainActivity$1.onClick(MainActivity.java:115)
10-10 11:25:11.380 23074-23074/com.example.techno_110.recordaudio
W/System.err: at android.view.View.performClick(View.java:5214)
10-10 11:25:11.380 23074-23074/com.example.techno_110.recordaudio
W/System.err: at
android.view.View$PerformClick.run(View.java:20978) 10-10 11:25:11.390
23074-23074/com.example.techno_110.recordaudio W/System.err: at
android.os.Handler.handleCallback(Handler.java:739) 10-10 11:25:11.390
23074-23074/com.example.techno_110.recordaudio W/System.err: at
android.os.Handler.dispatchMessage(Handler.java:95) 10-10 11:25:11.390
23074-23074/com.example.techno_110.recordaudio W/System.err: at
android.os.Looper.loop(Looper.java:145) 10-10 11:25:11.390
23074-23074/com.example.techno_110.recordaudio W/System.err: at
android.app.ActivityThread.main(ActivityThread.java:6134) 10-10
11:25:11.390 23074-23074/com.example.techno_110.recordaudio
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
10-10 11:25:11.390 23074-23074/com.example.techno_110.recordaudio
W/System.err: at java.lang.reflect.Method.invoke(Method.java:372)
10-10 11:25:11.390 23074-23074/com.example.techno_110.recordaudio
W/System.err: at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
10-10 11:25:11.390 23074-23074/com.example.techno_110.recordaudio
W/System.err: at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) 10-10
11:25:11.390 23074-23074/com.example.techno_110.recordaudio
E/MainActivity: recognize: ==> Started listening transactions 10-10
11:25:11.400 23074-23074/com.example.techno_110.recordaudio D/NMT:
RecorderSource$1: Starting recording 10-10 11:25:11.410
23074-23864/com.example.techno_110.recordaudio D/NMT:
AttachableHandler: Attached handler to current thread, sending 1
queued messages 10-10 11:25:11.420
23074-23074/com.example.techno_110.recordaudio D/NMT:
CommandContextImpl: Creating command NMDP_ASR_CMD 10-10 11:25:11.420
23074-23117/com.example.techno_110.recordaudio D/NMSP_: [ResourceImpl]
loadResource 10-10 11:25:11.430
23074-23117/com.example.techno_110.recordaudio D/NMSP_: [NMSPSession]
Creating new SDK calllog tree 10-10 11:25:11.430
23074-23864/com.example.techno_110.recordaudio E/AudioRecord: start()
status -38 10-10 11:25:11.430
23074-23864/com.example.techno_110.recordaudio V/NMT:
MicrophoneRecorderSourceBase$2: Android audio system onMarkerReached
invoked 10-10 11:25:11.430
23074-23864/com.example.techno_110.recordaudio E/NMT:
MicrophoneRecorderSource: readBuffer() _recorder.read() didn't read
any audio!!! 10-10 11:25:11.430
23074-23864/com.example.techno_110.recordaudio D/NMT:
MicrophoneRecorderSource: cleanup() stop _recorder. 10-10 11:25:11.430
23074-23864/com.example.techno_110.recordaudio D/NMT:
MicrophoneRecorderSource: cleanup() release _recorder. 10-10
11:25:11.440 23074-23864/com.example.techno_110.recordaudio D/NMT:
MicrophoneRecorderSource: handleSourceClosed() 10-10 11:25:11.440
23074-23117/com.example.techno_110.recordaudio I/NMSP:
[PDXTransactionImpl] appendLogToQueryBegin:
NMSPDefines.DEVICE_CMD_LOG_TO_SERVER_ENABLED is disabled 10-10
11:25:11.450 23074-23074/com.example.techno_110.recordaudio D/NMT:
CommandContextImpl: Sending param REQUEST_INFO 10-10 11:25:11.450
23074-23074/com.example.techno_110.recordaudio D/NMT:
CommandContextImpl: Sending param AUDIO_INFO 10-10 11:25:11.450
23074-23074/com.example.techno_110.recordaudio D/NMT:
CommandContextImpl: Ending command 10-10 11:25:11.450
23074-23074/com.example.techno_110.recordaudio D/NMT: AudioParam:
stream() 10-10 11:25:11.460
23074-23074/com.example.techno_110.recordaudio D/NMT: AudioParam:
sourceClosed() 10-10 11:25:11.460
23074-23074/com.example.techno_110.recordaudio D/NMT:
CommandContextImpl: [LATCHK] calling addAudioBuf() final 10-10
11:25:11.460 23074-23074/com.example.techno_110.recordaudio D/NMT:
CommandContextImpl: stream audio last buffer [true] 10-10 11:25:57.070
23074-23869/com.example.techno_110.recordaudio E/NMSP:
[NetworkSystemOEM] Set Socket Option Exception -
[javax.net.ssl.SSLHandshakeException] Message - [SSL handshake
aborted: ssl=0xaf541e00: I/O error during system call, Connection
reset by peer] 10-10 11:25:57.080
23074-23117/com.example.techno_110.recordaudio E/NMSP: [XMode]
XMode.openSocketCallback() NETWORK_ERROR 10-10 11:25:57.080
23074-23117/com.example.techno_110.recordaudio D/NMSP_:
[NMASResourceImpl] onSessionDisconnected() reasonCode:9 10-10
11:25:57.080 23074-23117/com.example.techno_110.recordaudio E/NMT:
CommandContextImpl: Command Creation Failed [NMDP_ASR_CMD] 10-10
11:25:57.080 23074-23074/com.example.techno_110.recordaudio D/NMT:
TransactionStateStreaming: Streaming parameter: AUDIO_INFO is
cancelled. 10-10 11:25:57.080
23074-23074/com.example.techno_110.recordaudio D/NMT: AudioParam:
cancelStreaming() 10-10 11:25:57.080
23074-23117/com.example.techno_110.recordaudio W/NMT:
CloudServicesImpl: Connection failed reasonCode [10]
I had searched a lot to overcome this problem , please someone help me out to fix this issue.

Phonegap: plugins not found in android

it seems that i messed up something with my configuration. After an Update of cordova and some cleaning operations all plugins cant be found by android. It says:
10-10 20:49:47.040 611-611/com.phonegap.helloworld W/System.err﹕ java.lang.ClassNotFoundException: org.apache.cordova.ContactManager
10-10 20:49:47.050 611-611/com.phonegap.helloworld W/System.err﹕ at java.lang.Class.classForName(Native Method)
10-10 20:49:47.050 611-611/com.phonegap.helloworld W/System.err﹕ at java.lang.Class.forName(Class.java:234)
10-10 20:49:47.060 611-611/com.phonegap.helloworld W/System.err﹕ at java.lang.Class.forName(Class.java:181)
10-10 20:49:47.060 611-611/com.phonegap.helloworld W/System.err﹕ at org.apache.cordova.PluginEntry.getClassByName(PluginEntry.java:117)
10-10 20:49:47.060 611-611/com.phonegap.helloworld W/System.err﹕ at org.apache.cordova.PluginEntry.createPlugin(PluginEntry.java:93)
10-10 20:49:47.070 611-611/com.phonegap.helloworld W/System.err﹕ at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:267)
10-10 20:49:47.070 611-611/com.phonegap.helloworld W/System.err﹕ at org.apache.cordova.PluginManager.execHelper(PluginManager.java:221)
10-10 20:49:47.070 611-611/com.phonegap.helloworld W/System.err﹕ at org.apache.cordova.PluginManager.exec(PluginManager.java:216)
10-10 20:49:47.080 611-611/com.phonegap.helloworld W/System.err﹕ at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
10-10 20:49:47.080 611-611/com.phonegap.helloworld W/System.err﹕ at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:221)
10-10 20:49:47.091 611-611/com.phonegap.helloworld W/System.err﹕ at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:566)
10-10 20:49:47.091 611-611/com.phonegap.helloworld W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:99)
10-10 20:49:47.091 611-611/com.phonegap.helloworld W/System.err﹕ at android.os.Looper.loop(Looper.java:123)
10-10 20:49:47.100 611-611/com.phonegap.helloworld W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:3683)
10-10 20:49:47.100 611-611/com.phonegap.helloworld W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
10-10 20:49:47.100 611-611/com.phonegap.helloworld W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:507)
10-10 20:49:47.110 611-611/com.phonegap.helloworld W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
10-10 20:49:47.110 611-611/com.phonegap.helloworld W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
10-10 20:49:47.110 611-611/com.phonegap.helloworld W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
10-10 20:49:47.121 611-611/com.phonegap.helloworld W/System.err﹕ Caused by: java.lang.NoClassDefFoundError: org.apache.cordova.ContactManager
10-10 20:49:47.130 611-611/com.phonegap.helloworld W/System.err﹕ ... 19 more
10-10 20:49:47.140 611-611/com.phonegap.helloworld W/System.err﹕ Caused by: java.lang.ClassNotFoundException: org.apache.cordova.ContactManager in loader dalvik.system.PathClassLoader[/data/app/com.phonegap.helloworld-1.apk]
10-10 20:49:47.150 611-611/com.phonegap.helloworld W/System.err﹕ at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
10-10 20:49:47.150 611-611/com.phonegap.helloworld W/System.err﹕ at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
10-10 20:49:47.150 611-611/com.phonegap.helloworld W/System.err﹕ at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
10-10 20:49:47.150 611-611/com.phonegap.helloworld W/System.err﹕ ... 19 more
10-10 20:49:47.161 611-611/com.phonegap.helloworld I/System.out﹕ Error adding plugin org.apache.cordova.ContactManager.
10-10 20:49:47.161 611-611/com.phonegap.helloworld D/PluginManager﹕ exec() call to unknown plugin: Contacts
10-10 20:49:47.180 611-611/com.phonegap.helloworld I/Web Console﹕ error in contacts: at file:///android_asset/www/js/contacts.js:30
How can i get the plugins working?
I am using phonegap 3.0.0c
If you navigate to your phonegap root directory and type "phonegap local plugin list", what does it say?
If nothing happens then try to reinstall every plugin with "phonegap local plugin add link/to/plugin".
But if the plugin listing generate an output with every installed plugin, try to delete the "android.json" in the plugins directory and build your android project again.
It should create a new android project with all plugins, which you downloaded previously.

Failed to inflate only on prod

Hello i have upload my new application to the google play store.
When i download my app from the play store and open it i got this error:
0-10 09:05:21.605: W/dalvikvm(22966): method Lorg/holoeverywhere/widget/aw;.getVirtualChildCount incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
10-10 09:05:21.715: W/dalvikvm(22966): method Lorg/holoeverywhere/widget/ProgressBar;.getCurrentDrawable incorrectly overrides package-private method with same name in Landroid/widget/ProgressBar;
10-10 09:05:21.725: E/ActivityThread(22966): Failed to inflate
10-10 09:05:21.725: E/ActivityThread(22966): android.view.InflateException: Binary XML file line #22: Error inflating class org.holoeverywhere.widget.ProgressBar
10-10 09:05:21.725: E/ActivityThread(22966): at org.holoeverywhere.k.a(Unknown Source)
10-10 09:05:21.725: E/ActivityThread(22966): at org.holoeverywhere.k.onCreateView(Unknown Source)
10-10 09:05:21.725: E/ActivityThread(22966): at org.holoeverywhere.k.a(Unknown Source)
10-10 09:05:21.725: E/ActivityThread(22966): at org.holoeverywhere.k.a(Unknown Source)
10-10 09:05:21.725: E/ActivityThread(22966): at org.holoeverywhere.k.inflate(Unknown Source)
10-10 09:05:21.725: E/ActivityThread(22966): at org.holoeverywhere.k.inflate(Unknown Source)
10-10 09:05:21.725: E/ActivityThread(22966): at android.support.v4.app._HoloActivity.a(Unknown Source)
10-10 09:05:21.725: E/ActivityThread(22966): at android.support.v4.app._HoloActivity.setContentView(Unknown Source)
10-10 09:05:21.725: E/ActivityThread(22966): at com.example.workoutlog.OpeningPage.onCreate(Unknown Source)
10-10 09:05:21.725: E/ActivityThread(22966): at android.app.Activity.performCreate(Activity.java:5104)
10-10 09:05:21.725: E/ActivityThread(22966): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
10-10 09:05:21.725: E/ActivityThread(22966): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
10-10 09:05:21.725: E/ActivityThread(22966): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
10-10 09:05:21.725: E/ActivityThread(22966): at android.app.ActivityThread.access$600(ActivityThread.java:153)
10-10 09:05:21.725: E/ActivityThread(22966): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
10-10 09:05:21.725: E/ActivityThread(22966): at android.os.Handler.dispatchMessage(Handler.java:99)
10-10 09:05:21.725: E/ActivityThread(22966): at android.os.Looper.loop(Looper.java:137)
10-10 09:05:21.725: E/ActivityThread(22966): at android.app.ActivityThread.main(ActivityThread.java:5227)
10-10 09:05:21.725: E/ActivityThread(22966): at java.lang.reflect.Method.invokeNative(Native Method)
10-10 09:05:21.725: E/ActivityThread(22966): at java.lang.reflect.Method.invoke(Method.java:511)
10-10 09:05:21.725: E/ActivityThread(22966): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
10-10 09:05:21.725: E/ActivityThread(22966): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
10-10 09:05:21.725: E/ActivityThread(22966): at dalvik.system.NativeStart.main(Native Method)
10-10 09:05:21.725: E/ActivityThread(22966): Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet]
10-10 09:05:21.725: E/ActivityThread(22966): at java.lang.Class.getConstructorOrMethod(Class.java:460)
10-10 09:05:21.725: E/ActivityThread(22966): at java.lang.Class.getConstructor(Class.java:431)
10-10 09:05:21.725: E/ActivityThread(22966): ... 23 more
10-10 09:05:21.755: D/AndroidRuntime(22966): Shutting down VM
10-10 09:05:21.755: W/dalvikvm(22966): threadid=1: thread exiting with uncaught exception (group=0x41f86930)
10-10 09:05:21.755: E/AndroidRuntime(22966): FATAL EXCEPTION: main
10-10 09:05:21.755: E/AndroidRuntime(22966): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tigo/com.example.workoutlog.OpeningPage}: android.view.InflateException: Binary XML file line #22: Error inflating class org.holoeverywhere.widget.ProgressBar
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.app.ActivityThread.access$600(ActivityThread.java:153)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.os.Handler.dispatchMessage(Handler.java:99)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.os.Looper.loop(Looper.java:137)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.app.ActivityThread.main(ActivityThread.java:5227)
10-10 09:05:21.755: E/AndroidRuntime(22966): at java.lang.reflect.Method.invokeNative(Native Method)
10-10 09:05:21.755: E/AndroidRuntime(22966): at java.lang.reflect.Method.invoke(Method.java:511)
10-10 09:05:21.755: E/AndroidRuntime(22966): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
10-10 09:05:21.755: E/AndroidRuntime(22966): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
10-10 09:05:21.755: E/AndroidRuntime(22966): at dalvik.system.NativeStart.main(Native Method)
10-10 09:05:21.755: E/AndroidRuntime(22966): Caused by: android.view.InflateException: Binary XML file line #22: Error inflating class org.holoeverywhere.widget.ProgressBar
10-10 09:05:21.755: E/AndroidRuntime(22966): at org.holoeverywhere.k.a(Unknown Source)
10-10 09:05:21.755: E/AndroidRuntime(22966): at org.holoeverywhere.k.onCreateView(Unknown Source)
10-10 09:05:21.755: E/AndroidRuntime(22966): at org.holoeverywhere.k.a(Unknown Source)
10-10 09:05:21.755: E/AndroidRuntime(22966): at org.holoeverywhere.k.a(Unknown Source)
10-10 09:05:21.755: E/AndroidRuntime(22966): at org.holoeverywhere.k.inflate(Unknown Source)
10-10 09:05:21.755: E/AndroidRuntime(22966): at org.holoeverywhere.k.inflate(Unknown Source)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.support.v4.app._HoloActivity.a(Unknown Source)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.support.v4.app._HoloActivity.setContentView(Unknown Source)
10-10 09:05:21.755: E/AndroidRuntime(22966): at com.example.workoutlog.OpeningPage.onCreate(Unknown Source)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.app.Activity.performCreate(Activity.java:5104)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
10-10 09:05:21.755: E/AndroidRuntime(22966): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
10-10 09:05:21.755: E/AndroidRuntime(22966): ... 11 more
10-10 09:05:21.755: E/AndroidRuntime(22966): Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet]
10-10 09:05:21.755: E/AndroidRuntime(22966): at java.lang.Class.getConstructorOrMethod(Class.java:460)
10-10 09:05:21.755: E/AndroidRuntime(22966): at java.lang.Class.getConstructor(Class.java:431)
10-10 09:05:21.755: E/AndroidRuntime(22966): ... 23 more
When i run the application from eclispe i dont get any of this error and everyting just running fine.
I think its the pro guard i added the my app but im not sure.
Here is my pro gurad settings:
proguard-project.txt:
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-dontwarn com.google.**
-dontwarn org.apache.**
-dontwarn twitter4j.**
project.properties
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-18
android.library.reference.1=..\\Application\\Libs android\\actionbarsherlock
android.library.reference.2=..\\Application\\Libs android\\facebook-android-sdk-3.5\\facebook
android.library.reference.3=..\\Application\\Libs android\\AmbilWarna
android.library.reference.4=..\\Application\\Libs android\\HoloEverywhere-master\\addons\\preferences
android.library.reference.5=..\\Application\\Libs android\\HoloEverywhere-master\\library
android.library.reference.6=../Application/Libs android/google-play-services_lib
Thank for helping!

android: ads cannot be incorporated to the program

i have just finished my first app and would like to incorporate ad to the bottom of the app. the coding for the ad banner is solely obtained from the Google website at https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals, and added to the mainactivity jar. Everything seems fine but then when i run the program, it crashes, logcat and jar coded as follows:
1) How can these be solved? (The program without ads can be run without any error)
2) How to set for ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" ???
3) My xml is a TableLayout, does it matters? (from the logcat it seems cannot properly inflate the ad?)
Many thanks in advance!!
Jar part:
import com.google.ads.*;
import com.google.ads.AdRequest;
import com.google.ads.AdSize;
import com.google.ads.AdView;
public class MainActivity extends Activity {
AdView adView;
public static final String MY_PUBLISHER_ID = "a123123123123123c"; //this one is correct
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//request TEST ads to avoid being disabled for clicking your own ads
AdRequest adRequest = new AdRequest();
//test mode on EMULATOR
adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
//test mode on DEVICE (this example code must be replaced with your device unique ID)
adRequest.addTestDevice("4G74FC73D62D42B62A7F7DA61EF5F776"); //how to set this? this one is copied from the tutorial only
//create a Banner Ad
adView = new AdView(this, AdSize.BANNER, MY_PUBLISHER_ID);
//call the main layout from xml
TableLayout mainLayout = (TableLayout)findViewById(R.id.tableLayout);
//add the Banner Ad to our main layout
mainLayout.addView(adView);
// Initiate a request to load an ad in TEST mode.
// The test mode will work only on emulators and your specific test device,
// the users will get real ads.
adView.loadAd(adRequest);
}
// ad
#Override
public void onDestroy()
{
if (adView != null) { adView.destroy(); }
super.onDestroy();
}
// ad
Logcat as follows:
10-10 01:17:34.230: D/dalvikvm(13612): Late-enabling CheckJNI
10-10 01:17:34.650: E/dalvikvm(13612): Could not find class 'com.google.ads.AdRequest', referenced from method com.pearappx.acctcalc.MainActivity.onCreate
10-10 01:17:34.650: W/dalvikvm(13612): VFY: unable to resolve new-instance 425 (Lcom/google/ads/AdRequest;) in Lcom/pearappx/acctcalc/MainActivity;
10-10 01:17:34.650: D/dalvikvm(13612): VFY: replacing opcode 0x22 at 0x0009
10-10 01:17:34.650: I/dalvikvm(13612): Could not find method com.google.ads.AdView.destroy, referenced from method com.pearappx.acctcalc.MainActivity.onDestroy
10-10 01:17:34.650: W/dalvikvm(13612): VFY: unable to resolve virtual method 3042: Lcom/google/ads/AdView;.destroy ()V
10-10 01:17:34.650: D/dalvikvm(13612): VFY: replacing opcode 0x6e at 0x0006
10-10 01:17:34.650: D/dalvikvm(13612): DexOpt: unable to opt direct call 0x0bdf at 0x0b in Lcom/pearappx/acctcalc/MainActivity;.onCreate
10-10 01:17:34.650: I/dalvikvm(13612): DexOpt: unable to optimize static field ref 0x02e7 at 0x0e in Lcom/pearappx/acctcalc/MainActivity;.onCreate
10-10 01:17:34.700: I/dalvikvm(13612): DexOpt: unable to optimize static field ref 0x02e8 at 0x1a in Lcom/pearappx/acctcalc/MainActivity;.onCreate
10-10 01:17:34.700: D/dalvikvm(13612): DexOpt: unable to opt direct call 0x0be1 at 0x1e in Lcom/pearappx/acctcalc/MainActivity;.onCreate
10-10 01:17:35.085: D/AndroidRuntime(13612): Shutting down VM
10-10 01:17:35.085: W/dalvikvm(13612): threadid=1: thread exiting with uncaught exception (group=0x40c781f8)
10-10 01:17:35.105: E/AndroidRuntime(13612): FATAL EXCEPTION: main
10-10 01:17:35.105: E/AndroidRuntime(13612): java.lang.NoClassDefFoundError: com.google.ads.AdRequest
10-10 01:17:35.105: E/AndroidRuntime(13612): at com.pearappx.acctcalc.MainActivity.onCreate(MainActivity.java:94)
10-10 01:17:35.105: E/AndroidRuntime(13612): at android.app.Activity.performCreate(Activity.java:4470)
10-10 01:17:35.105: E/AndroidRuntime(13612): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)
10-10 01:17:35.105: E/AndroidRuntime(13612): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
10-10 01:17:35.105: E/AndroidRuntime(13612): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
10-10 01:17:35.105: E/AndroidRuntime(13612): at android.app.ActivityThread.access$600(ActivityThread.java:127)
10-10 01:17:35.105: E/AndroidRuntime(13612): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
10-10 01:17:35.105: E/AndroidRuntime(13612): at android.os.Handler.dispatchMessage(Handler.java:99)
10-10 01:17:35.105: E/AndroidRuntime(13612): at android.os.Looper.loop(Looper.java:137)
10-10 01:17:35.105: E/AndroidRuntime(13612): at android.app.ActivityThread.main(ActivityThread.java:4511)
10-10 01:17:35.105: E/AndroidRuntime(13612): at java.lang.reflect.Method.invokeNative(Native Method)
10-10 01:17:35.105: E/AndroidRuntime(13612): at java.lang.reflect.Method.invoke(Method.java:511)
10-10 01:17:35.105: E/AndroidRuntime(13612): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
10-10 01:17:35.105: E/AndroidRuntime(13612): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
10-10 01:17:35.105: E/AndroidRuntime(13612): at dalvik.system.NativeStart.main(Native Method)
I think you forgot to add admob jar to classpath
Hey follow this tutorial
you have missed to add jar into your libs folder

Google Calendar API error: Class definition not found for Calendar class

Hello everybody,
I am developing a app which will download all the events from google calendar to android device.
I found this example:
http://code.google.com/p/google-api-java-client/source/browse/calendar-android-sample/?repo=samples
I also downloaded the required library from http://code.google.com/p/google-api-java-client/wiki/APIs
Also from here : "http://code.google.com/p/google-api-java-client/downloads/list"
But I am getting error as class definition not found. Please help me.
My Logcat is as follows:
***10-10 12:52:10.129: E/dalvikvm(551): Could not find class 'com.google.api.services.calendar.Calendar$Builder', referenced from method com.examples.gcalsync.CalendarSample.onCreate***
10-10 12:52:10.129: W/dalvikvm(551): VFY: unable to resolve new-instance 702 (Lcom/google/api/services/calendar/Calendar$Builder;) in Lcom/examples/gcalsync/CalendarSample;
10-10 12:52:10.129: D/dalvikvm(551): VFY: replacing opcode 0x22 at 0x0009
10-10 12:52:10.129: D/dalvikvm(551): VFY: dead code 0x000b-0060 in Lcom/examples/gcalsync/CalendarSample;.onCreate (Landroid/os/Bundle;)V
10-10 12:52:10.139: E/dalvikvm(551): Could not find class 'com.google.api.services.calendar.model.Calendar', referenced from method com.examples.gcalsync.CalendarSample.onOptionsItemSelected
10-10 12:52:10.139: W/dalvikvm(551): VFY: unable to resolve new-instance 710 (Lcom/google/api/services/calendar/model/Calendar;) in Lcom/examples/gcalsync/CalendarSample;
10-10 12:52:10.139: D/dalvikvm(551): VFY: replacing opcode 0x22 at 0x000b
10-10 12:52:10.139: D/dalvikvm(551): VFY: dead code 0x000d-0036 in Lcom/examples/gcalsync/CalendarSample;.onOptionsItemSelected (Landroid/view/MenuItem;)Z
10-10 12:52:10.179: D/AndroidRuntime(551): Shutting down VM
10-10 12:52:10.179: W/dalvikvm(551): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
10-10 12:52:10.199: E/AndroidRuntime(551): FATAL EXCEPTION: main
***10-10 12:52:10.199: E/AndroidRuntime(551): java.lang.NoClassDefFoundError: com.google.api.services.calendar.Calendar$Builder***
10-10 12:52:10.199: E/AndroidRuntime(551): at com.examples.gcalsync.CalendarSample.onCreate(CalendarSample.java:127)
10-10 12:52:10.199: E/AndroidRuntime(551): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-10 12:52:10.199: E/AndroidRuntime(551): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
10-10 12:52:10.199: E/AndroidRuntime(551): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-10 12:52:10.199: E/AndroidRuntime(551): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-10 12:52:10.199: E/AndroidRuntime(551): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
10-10 12:52:10.199: E/AndroidRuntime(551): at android.os.Handler.dispatchMessage(Handler.java:99)
10-10 12:52:10.199: E/AndroidRuntime(551): at android.os.Looper.loop(Looper.java:123)
10-10 12:52:10.199: E/AndroidRuntime(551): at android.app.ActivityThread.main(ActivityThread.java:4627)
10-10 12:52:10.199: E/AndroidRuntime(551): at java.lang.reflect.Method.invokeNative(Native Method)
10-10 12:52:10.199: E/AndroidRuntime(551): at java.lang.reflect.Method.invoke(Method.java:521)
10-10 12:52:10.199: E/AndroidRuntime(551): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-10 12:52:10.199: E/AndroidRuntime(551): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-10 12:52:10.199: E/AndroidRuntime(551): at dalvik.system.NativeStart.main(Native Method)
Issue got solved.
Just need to put all external libraries in libs folder....

Categories

Resources