Android Studio couldn't initialize class com.gradle.scan - android-studio

I get this error when I try to run the app. I also get some Room database error but I fixed them,but this error occurs when I run the app.
Could not initialize class com.gradle.scan.agent.serialization.scan.a.g
* Exception is:
java.lang.NoClassDefFoundError: Could not initialize class com.gradle.scan.agent.serialization.scan.a.g
at com.gradle.scan.plugin.internal.g.a.a(SourceFile:22)
at com.gradle.scan.plugin.internal.b.w.a.a(SourceFile:11)
at com.gradle.scan.plugin.internal.b.c.a(SourceFile:38)
at com.gradle.scan.plugin.internal.o.d.a(SourceFile:51)
at com.gradle.scan.plugin.internal.r.a.b(SourceFile:111)
at com.gradle.scan.plugin.internal.o.d.a(SourceFile:50)
at com.gradle.scan.plugin.internal.c.d$c.a(SourceFile:60)

Related

App crashes after selecting option in menu on phone but not in emulator android studio

If i test my app on the android emulator it works great, but if i test it on my phone, i get the menu i need, but when i push a button to get the data from a mysql server it crashes.
This is my log with errors say after the crash in Android Studio.:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.myapplication, PID: 32610
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:121)
at org.json.JSONTokener.nextValue(JSONTokener.java:98)
at org.json.JSONArray.(JSONArray.java:94)
at org.json.JSONArray.(JSONArray.java:110)
at com.example.myapplication.ProductkeuzeActivity.loadIntoListView(ProductkeuzeActivity.java:85)
at com.example.myapplication.ProductkeuzeActivity.-$$Nest$mloadIntoListView(Unknown Source:0)
at com.example.myapplication.ProductkeuzeActivity$1DownloadJSON.onPostExecute(ProductkeuzeActivity.java:55)
at com.example.myapplication.ProductkeuzeActivity$1DownloadJSON.onPostExecute(ProductkeuzeActivity.java:41)
at android.os.AsyncTask.finish(AsyncTask.java:771)
at android.os.AsyncTask.access$900(AsyncTask.java:199)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8645)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Can anybody help me to solve this?
Almost 3 weeks i'm trying to get it work, so if i mist something here to place just call.

MyApplication is never used

I'm trying to use the class "MyApplication". but I got messages such as my title. first of all, I added as (android:name = ".MyApplication"). and also added ( android:allowBackup="true"). but You can see my second screenshot. The Notice said MyApplication is an unresolved class... What should I do for resolving it?
java.lang.RuntimeException: Unable to instantiate application
com.example.todolist.MyApplication: java.lang.ClassNotFoundException: Didn't
find class "com.example.todolist.MyApplication"
Caused by: java.lang.ClassNotFoundException: Didn't find class
"com.example.todolist.MyApplication" on path:/

Change project file name in Xcode 10

I am trying to change a Project name in Xcode 10 and I have tried all the suggested methods I could find;
Rename project
Rename the Scheme
Rename the folder with your assets
Rename the Build plist data
I do all the above steps and the project complies and builds with out issues.
When I load the app on a iPhone, it crashed when I select a specific screen and I get the following errors;
2019-07-29 17:56:13.315622-0400 SkeetLauncher_RevA[736:163909] Unknown class _TtC14SKEET_LAUNCHER13launchButtons in Interface Builder file.
2019-07-29 17:56:13.363768-0400 SkeetLauncher_RevA[736:163909] [Graphics] UIColor created with component values far outside the expected range. Set a breakpoint on UIColorBreakForOutOfRangeColorComponents to debug. This message will only be logged once.
2019-07-29 17:56:13.372489-0400 SkeetLauncher_RevA[736:163909] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x101d01910> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key DELAY.'
*** First throw call stack:
(0x18f237ea0 0x18e409a40 0x18f15197c 0x18fbe320c 0x1bbce65e4 0x1bbf5fa5c 0x18f121748 0x1bbf5c6cc 0x1bbced25c 0x1bbcedc08 0x1bbceded0 0x1bbcee63c 0x1bbc46e28 0x1bbc5b8e8 0x1bbc5cdbc 0x1bbc3efac 0x1bc75aea4 0x19382ac70 0x19382fc00 0x19378e718 0x1937bd04c 0x1937bdeb4 0x18f1c77a8 0x18f1c243c 0x18f1c29dc 0x18f1c21cc 0x191439584 0x1bc2b5054 0x100c453f4 0x18ec82bb4)
libc++abi.dylib: terminating with uncaught exception of type NSException.
The project compiles and runs fine before I do the rename process.
Go into the storyboard and reenter all the view controller class names.
That didn't work but it pointed me in the right direction, Thanks
I had to change the "Module" for "Custom Class" in identity inspector. I guess the "Change Project Name" process didn't automatically do it for all the view controllers. Attached is picture for clarification.
MODULE in Identity Inspector

Class init failed in newInstance call

I am continuously facing a situation of which I have no idea. I am tried to test one method that I have implemented in C++. I got an error, a Class init failed when calling newInstance .
It further states that cannot load library:reloc_library[1311]:33 cannot locate 'Z13trainFacePKcS0'... and suddenly it crashes and throw exception. It gives the same error. I will appreciate any help.
Regards,
Adonis.
You have loaded a library like this in the class which gets loaded during class initialization.
static {
System.loadLibrary("gamescript");
}
From your error you have posted, it seems the library cannot be located which means, it either is not present in the apk file or it is not inside the libs folder.

three20 application crash in class TTBaseViewController.m : UIViewControllerGarbageCollection.h' file not found

I am using Xcode4 and try to implement the three30 framework in my app
Source : http://galic-design.com/objective-c/make-my-own-iphone-app-looking-like-facebook-app#comment-27
my application crashes before launching
It crashes in class TTBaseViewController.m
in function
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
at line
UIViewController* popup = [self popupViewController];
[Thread 1: Program received signal: "SIGABRT"]
Any Idea what is the issue
Also its giving error in same class
file://localhost/Users/amit/works/three20/src/Three20UICommon/Sources/TTBaseViewController.m: error: Lexical or Preprocessor Issue: 'Three20UICommon/private/UIViewControllerGarbageCollection.h' file not found

Resources