stackoverflow exception when using android studio inspect code - android

I am new here. When I use Inspect Code in Android Studio 0.9.2, I get the error:
null
java.lang.StackOverflowError
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:265)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
But when I run lint command in Term, it works fine.

Related

NativeScript Build - Error executing Static Binding Generator: Class not found android.support.v4.view.ViewPager.OnPageChangeListener

I'm new to NativeScript and took over a project recently upgraded from NativeScript 4 to 6. Here is my environment detials:
Windows 10
Node v16.6.1
NativeScript 8.0.2
Android Studio 11 (with al
the recommended updates to date)
VS Code 1.58.2
I can create a new Native script project with "tns create" and build/run it in the simulator just fine. However, when I try to run the project the build throws the following error:
java.lang.RuntimeException: Class not found android.support.v4.view.ViewPager.OnPageChangeListener
at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:551)
at org.nativescript.staticbindinggenerator.Generator.getInterfacesFromCache(Generator.java:534)
at org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:283)
at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:171)
at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:234)
at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:121)
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:97)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:55)
Here is the run command I'm using: "tns run android --emulator"
I have tried tons of things and searches but no luck resolving this issue.
So I had an idea and searched with a different search engine than I normally use. I did find some ideas which helped me resolved the issue.
I had previously searched in VSCode for variations on "android.support.v4.view.ViewPager.OnPageChangeListener", but only found the log file with the error. Then I learned you have to change the filter options of the find in file search otherwise the files you are looking for can be excluded from the search results. I also used Baregrep to confirm I was getting everything.
I fixed the issue by replacing all occurrences of:
android.support.v4.view.ViewPager with androidx.viewpager.widget.ViewPager
Also you may need to install widgets:npm i tns-core-modules-widgets
Since the files where I made the changes were all non-project files (many of them in the node_modules directory) there is probably something else that involves updating Node or NativeScript that may solve this as well.
If someone else figures that out, I'll be watching this thread for updates, and thanks in advance!
Fissh

How to get the full information of runtime error instead of <Timeout exceeded getting exception details>?

So I'm trying out xamarin in VS2017, but found this undhandled error:
Unhandled Exception:
Java.Lang.SecurityException: <Timeout exceeded getting exception details>
This is very clueless. How can I get the full information of the runtime error like in Android Studio?
I had the same problem while calling some native API,
solved it by
Put a try catch around the block of got which is throwing the error.
Put a breakpoint in the catch block, you can get actual details of the exception.
After getting assistance from Microsoft, I finally found the solution.
TL;DR
Use VS Android device log and filter with "mono-rt" or "Error"
Complete Answer:
There are 2 solution:
1. Using Android Studio logcat:
Open the Android Studio logcat (View > Tool Windows > Logcat). From the logcat window, choose the device, choose the Xamarin.Android deployed application, and choose logcat for Error
Android logcat will display the runtime error:
2. Using Visual Studio Android Device Log:
Open the Visual Studio Android Device Log(Tools > Android > Device Log).
Here is the tricky bit: Unlike Android Studio, VS list all of the device log, not limited to the Xamarin.Android app deployed. So somehow we have to use the filter to get the relevant information. The problem is, what filter should we use? I used my application name and the error didn't show up. It turns out that when the error happen, the log doesn't contain any of the application name. Instead it has "mono-rt" tag with "Error" type.
So there you have it. Filter it with "mono-rt" tag or "Error" type and you will find the error information

Xamarin Forms Ui project (Multiplatform)

I am making this UI for a multiplatform app using Xamarin on my Macbook.
I have set FormsUI as startup project.
Xamarin gives errors when i try to run the project on ios simulator.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets:
Error: Failed to load output manifest for ibtool: Unrecognized property list format. (XPlatformFormsUI.iOS)
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets:
Error: Output manifest contents: (XPlatformFormsUI.iOS)
This particular error has been mentioned in the Xamarin Forms forum; basically, something in one of the iOS assets (e.g. a storyboard) is the cause. Unfortunately, you don't get much information regarding WHICH asset it was in the error. Try creating a brand new solution and gradually introduce your changes until you hit the error.

Error while trying to apportable iOS app to Android

I have been trying to port my first iOS app to Android with apportable.
I have solved alot of warnings and errors but cannot get rid of this last one.
The App I made is a fitness application for jogging so it uses CoreLocation.
Everything looks good when I run apportable now except this last error:
Build/android-armeabi-debug/com.apptonix.easyrunner/testTabbedWithCore/libtestTabbedWithCore.a(DetailViewController.m.o):/Users/peterbodlund/Documents/xcodeprojects/Training/inlamning5/testTabbedWithCore/testTabbedWithCore/DetailViewController.m:function L_OBJC_CLASSLIST_REFERENCES_$_114: error: undefined reference to 'OBJC_CLASS_$_MKPinAnnotationView'
scons: * [Build/android-armeabi-debug/EasyRunner/apk/lib/armeabi/libverde.so] Error 1
scons: building terminated because of errors.
Exception AttributeError: "'NoneType' object has no attribute 'pack'" in > ignored
Usually this is an indicator that there were link errors. Check your output higher up and look for missing symbol errors.
The build log is confusing because the build is parallel by default.
Add the option -j1 to cause the build to stop immediately after the first error.

Gradle Error for Android Studio

I'm trying out Android Studio on OS X and am running into a mysterious error message. I went through the Google guide to building a simple UI, but when I finished writing the XML file and hit Run in the IDE, I get the following message ("Test2" is the name of the project):
Gradle: Execution failed for task ':Test2:validateDebugSigning'.
> Could not find matching constructor for: org.gradle.tooling.BuildException(java.lang.String)
I have never developed an android app before, so I don't know how common this is. I did a search for this error and found no one encountering the same problem.
I tried the solution from Abhan and I get a new error message:
Error: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings
It warns you that android plug-in task validateDebugSigning cannot access the debug key. Check your accessibility to the debug.keystore.
On linux or OS X, the default location is ~/.android. On windows, it's in C:\Documents and Settings\.android\ or C:\Users\.android.

Categories

Resources