E/AndroidRuntime(585): java.lang.NoClassDefFoundError twitter4j.http.AccessToken - twitter4j

I have been following this tutorial
http://www.android10.org/index.php/articleslibraries/291-twitter-integration-in-your-android-application
I entered these details for the consumer_key and the consumer_secret
public class Constants {
public static final String CONSUMER_KEY = "<FILL IN YOUR CONSUMER KEY FROM TWITTER HERE>";
public static final String CONSUMER_SECRET= "<FILL IN YOUR CONSUMER SECRET FROM TWITTER HERE>";
public static final String REQUEST_URL = "http://api.twitter.com/oauth/request_token";
public static final String ACCESS_URL = "http://api.twitter.com/oauth/access_token";
public static final String AUTHORIZE_URL = "http://api.twitter.com/oauth/authorize";
public static final String OAUTH_CALLBACK_SCHEME = "x-oauthflow-twitter";
public static final String OAUTH_CALLBACK_HOST = "callback";
public static final String OAUTH_CALLBACK_URL = OAUTH_CALLBACK_SCHEME + "://" + OAUTH_CALLBACK_HOST;
}
I then added the lib directory
.classpath
also a text document with this path
.gitignore
This allowed the files to be recognized the new library files that I had added.
Here is my error log
05-28 21:10:10.586: E/dalvikvm(538): Could not find class 'twitter4j.http.AccessToken', referenced from method alex.android.twitter.feed.TwitterUtils.isAuthenticated
05-28 21:10:10.586: W/dalvikvm(538): VFY: unable to resolve new-instance 67 (Ltwitter4j/http/AccessToken;) in Lalex/android/twitter/feed/TwitterUtils;
05-28 21:10:10.596: D/dalvikvm(538): VFY: replacing opcode 0x22 at 0x0010
05-28 21:10:10.596: E/dalvikvm(538): Could not find class 'twitter4j.http.AccessToken', referenced from method alex.android.twitter.feed.TwitterUtils.sendTweet
05-28 21:10:10.596: W/dalvikvm(538): VFY: unable to resolve new-instance 67 (Ltwitter4j/http/AccessToken;) in Lalex/android/twitter/feed/TwitterUtils;
05-28 21:10:10.606: D/dalvikvm(538): VFY: replacing opcode 0x22 at 0x0010
05-28 21:10:10.606: D/dalvikvm(538): DexOpt: unable to opt direct call 0x006c at 0x12 in Lalex/android/twitter/feed/TwitterUtils;.isAuthenticated
05-28 21:10:10.606: D/dalvikvm(538): DexOpt: unable to opt direct call 0x006a at 0x17 in Lalex/android/twitter/feed/TwitterUtils;.isAuthenticated
05-28 21:10:10.606: D/dalvikvm(538): DexOpt: unable to opt direct call 0x006c at 0x12 in Lalex/android/twitter/feed/TwitterUtils;.sendTweet
05-28 21:10:10.606: D/dalvikvm(538): DexOpt: unable to opt direct call 0x006a at 0x17 in Lalex/android/twitter/feed/TwitterUtils;.sendTweet
05-28 21:10:10.606: D/AndroidRuntime(538): Shutting down VM
05-28 21:10:10.616: W/dalvikvm(538): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
05-28 21:10:10.636: E/AndroidRuntime(538): FATAL EXCEPTION: main
05-28 21:10:10.636: E/AndroidRuntime(538): java.lang.NoClassDefFoundError: twitter4j.http.AccessToken
05-28 21:10:10.636: E/AndroidRuntime(538): at alex.android.twitter.feed.TwitterUtils.isAuthenticated(TwitterUtils.java:17)
05-28 21:10:10.636: E/AndroidRuntime(538): at alex.android.twitter.feed.TwitterActivity.updateLoginStatus(TwitterActivity.java:74)
05-28 21:10:10.636: E/AndroidRuntime(538): at alex.android.twitter.feed.TwitterActivity.onResume(TwitterActivity.java:70)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1154)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.app.Activity.performResume(Activity.java:4539)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2434)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2472)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1986)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.os.Handler.dispatchMessage(Handler.java:99)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.os.Looper.loop(Looper.java:137)
05-28 21:10:10.636: E/AndroidRuntime(538): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-28 21:10:10.636: E/AndroidRuntime(538): at java.lang.reflect.Method.invokeNative(Native Method)
05-28 21:10:10.636: E/AndroidRuntime(538): at java.lang.reflect.Method.invoke(Method.java:511)
05-28 21:10:10.636: E/AndroidRuntime(538): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-28 21:10:10.636: E/AndroidRuntime(538): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-28 21:10:10.636: E/AndroidRuntime(538): at dalvik.system.NativeStart.main(Native Method)

I also faced same problem in my project. I changed the folder name lib to libs then
it worked fine for me.
This problem is due to the fact that libraries are not managed the same way with the new ADT build.

A NoClassDefFoundError means that one of your libraries is depending on another library which couldn't be found. If you don't put all the correct libraries in your classpath this error will most likely show up.
For example,
when the twitter library uses the slf4j library for logging, but you haven't included it in the classpath, this error will appear.
Also next time when you post, make sure to put the full error log. Just 1 line isn't much help

Related

How to resolve Flutter unsatisfied link error?

In Firebase crashlytics, I am getting the following information about the crash.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myawesomeapp/com.example.myawesomeapp.MainActivity}: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/base.apk", zip file "/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.en.apk", zip file "/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.es.apk", zip file "/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.x86.apk", zip file "/data/app/com.example.myawesomeapp-zqi6k7PQCL8VlHwCIoANUA==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/lib/x86, /data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/base.apk!/lib/x86, /data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.en.apk!/lib/x86, /data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.es.apk!/lib/x86, /data/app/com.example.myawesomeapp-dghasjbcdcjdfhcn==/split_config.x86.apk!/lib/x86, /data/app/com.example.myawesomeapp-zqi6k7PQCL8VlHwCIoANUA==/split_config.xxhdpi.apk!/lib/x86, /system/lib, /system/vendor/lib]]] couldn't find "libflutter.so"
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

How to fix this error in ionic 3

Error:
UP-TO-DATE :app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:106:
AAPT: error: resource string/fb_app_id (aka
io.ionic.starter:string/fb_app_id) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:109:
AAPT: error: resource string/fb_app_name (aka
io.ionic.starter:string/fb_app_name) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:113:
AAPT: error: resource string/fb_app_name (aka
io.ionic.starter:string/fb_app_name) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:106:
error: resource string/fb_app_id (aka
io.ionic.starter:string/fb_app_id) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:109:
error: resource string/fb_app_name (aka
io.ionic.starter:string/fb_app_name) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:113:
error: resource string/fb_app_name (aka
io.ionic.starter:string/fb_app_name) not found. error: failed
processing manifest.
Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute
aapt
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.ExecutionException:
java.util.concurrent.ExecutionException:
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
... 48 more Caused by: java.util.concurrent.ExecutionException:
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:454)
at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:411)
at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)
FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED 25 actionable tasks: 1 executed, 24 up-to-date in 42s
(node:21224) UnhandledPromiseRejectionWarning: Error: cmd: Command
failed with exit code 1 Error output:
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:106:
AAPT: error: resource string/fb_app_id (aka
io.ionic.starter:string/fb_app_id) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:109:
AAPT: error: resource string/fb_app_name (aka
io.ionic.starter:string/fb_app_name) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:113:
AAPT: error: resource string/fb_app_name (aka
io.ionic.starter:string/fb_app_name) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:106:
error: resource string/fb_app_id (aka
io.ionic.starter:string/fb_app_id) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:109:
error: resource string/fb_app_name (aka
io.ionic.starter:string/fb_app_name) not found.
D:\ion\eventmanagement\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:113:
error: resource string/fb_app_name (aka
io.ionic.starter:string/fb_app_name) not found. error: failed
processing manifest.
Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute
aapt
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.ExecutionException:
java.util.concurrent.ExecutionException:
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
... 48 more Caused by: java.util.concurrent.ExecutionException:
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:454)
at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:411)
at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 42s
at ChildProcess.whenDone (D:\ion\eventmanagement\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5) (node:21224)
UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function
without a catch block, or by rejecting a promise which was not handled
with .catch(). (rejection id: 1) (node:21224) [DEP0018]
DeprecationWarning: Unhandled promise rejections are deprecated. In
the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
When you install the Facebook plugin you did not provide APP_ID and APP_NAME like in bellow example. Check the config.xml to verify this. More information could be found in their DOC.
ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"
Hope this help to you!

Error during Android Execution on device

I am new to programming. Please bear with me. I tried developing spinner class on an existing activity with other views. However due to some error, the execution failed. I deleted all stuffs related to spinner class in
activitymain.java
main_activity.xml (in my case different name, this for easier
understanding)
and every other detail related to spinner view
Now, when I am trying to execute the activity with existing views, I am getting the following error. Still not getting a hint of what happened and how this can be resolved
So here's what the logcat is displaying
02-14 04:41:29.341 20105-20105/com.example.bharathduraiswamy.comboedittext E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.bharathduraiswamy.comboedittext/com.example.bharathduraiswamy.comboedittext.MainActivity}: java.lang.InstantiationException: can't instantiate class com.example.bharathduraiswamy.comboedittext.MainActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2239)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
at android.app.ActivityThread.access$600(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5336)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.InstantiationException: can't instantiate class com.example.bharathduraiswamy.comboedittext.MainActivity
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2230)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
            at android.app.ActivityThread.access$600(ActivityThread.java:156)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:153)
            at android.app.ActivityThread.main(ActivityThread.java:5336)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
            at dalvik.system.NativeStart.main(Native Method)
Your activity lacks default (with no parameters) constructor or throws some exception in the constructor.
ok, i am good. Overcame the errors and got the reason behind the error. Defined mainactivity.java as abstract but abstract classes can't be instantiated.
I believe the abstract was created when trying to implement onItemSelectListener() and I failed to delete it when deleting everything related to spinner view
Regards

Porting Android App to BB10 OS (BlackBerry)

I am trying to port a native Android app to BB10 OS (BlackBerry). I was able to install the app but when I launch it, I see this error:
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to create application com.example.MyApplication: java.lang.SecurityException: Failed to open /dev/urandom for writing
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4454)
at android.app.ActivityThread.access$1300(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5116)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.SecurityException: Failed to open /dev/urandom for writing
at o.dD$if.Ë‹(:279)
at o.dD$if.engineSetSeed(:215)
at java.security.SecureRandom.setSeed(SecureRandom.java:243)
at java.security.SecureRandom.setSeed(SecureRandom.java:258)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at o.ff$Õ™.<clinit>(Unknown Source)
at o.dA.ËŠ(:285)
at o.dA.<init>(:99)
at o.dA.ËŠ(:151)
at com.example.MyApplication.ͺ(:182)
at com.example.MyApplication.onCreate(:66)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4451)
... 10 more
Caused by: java.io.FileNotFoundException: /dev/urandom: open failed: EACCES (Permission denied)
at libcore.io.IoBridge.open(IoBridge.java:409)
at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
at o.dD$if.Ë‹(:277)
... 23 more
Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:393)
... 26 more
W/ActivityManager(6766745): Force finishing activity com.example.android.agent/com.example.agent.activities.LaunchActivity
E/OrientationUtil(6766745): Unable to read sensor data. errno 11
D/dalvikvm(20689057): GC_CONCURRENT freed 307K, 5% free 10097K/10576K, paused 1ms+1ms, total 48ms
Any insights into addressing this issue is highly appreciated.

Android: Published App crashes with ClassNotFoundException

I have just published my first app today but for some reason when I use the published version I keep getting a ClassNotFoundException error when it starts up. It works fine when I test it in debug mode on my phone so I'm not sure whats causing this.
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.androidProjects.personal/com.androidProjects.personal.GAAClubFinderActivity}: java.lang.ClassNotFoundException: com.androidProjects.personal.GAAClubFinderActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2141)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2260)
at android.app.ActivityThread.access$600(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:5045)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.androidProjects.personal.GAAClubFinderActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1039)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2132)
... 11 more
Any Ideas?