How to implement ArcMenu for Android? - eclipse

I'm trying to get ArcMenu for my application.
The code runs great by itself, but I don't know how to make it work with another project.
It doesn't look like an Android Library project...
When trying to use this project with my own, this is what I get in Eclipse's console:
res/layout/arc_menu.xml:4: error: No resource identifier found for attribute 'fromDegrees' in package 'com.capricorn'
res/layout/arc_menu.xml:4: error: No resource identifier found for attribute 'toDegrees' in package 'com.capricorn'
res/layout/ray_menu.xml:4: error: No resource identifier found for attribute 'childSize' in package 'com.capricorn'
res/layout/ray_menu.xml:4: error: No resource identifier found for attribute 'leftHolderWidth' in package 'com.capricorn'

EDIT
I forked ArcMenu and published it on Github.
Now a better recode of it appeared: https://github.com/siyamed/android-satellite-menu
I recommend you use that one.

it seems that on your XML you didn't properly define the namespace.
for example for all the android framework stuff is:
xmlns:android="http://schemas.android.com/apk/res/android"
I suggest checking on your examples what would be for the ArcLibrary.

Related

Groovy:General error during semantic analysis: java.lang.NoSuchMethodError:

Imported the gradle project from the "complete" folder and received the following error:
Groovy:General error during semantic analysis:
java.lang.NoSuchMethodError: 'org.codehaus.groovy.ast.expr.Expression org.codehaus.groovy.ast.tools.GeneralUtils.propX(org.codehaus.groovy.ast.expr.Expression, java.lang.String)'
I am using the latest version of Eclipse, 2020-12, with groovy tools installed.
From grails guide
https://guides.grails.org/gorm-without-grails/guide/index.html
Downloaded code sample from github
https://github.com/grails-guides/gorm-without-grails.git
It seems likely to be a version mismatch, but I cannot determine how to correct this problem.
I have tried to delete the offending file, src/main/groovy/demo/domain/Manufacturer.groovy, and the error appears on the file in this package on line 1.
The error does not appear in any other package. I have done the usual internet searches for resolutions that apply, but have thus far been unable to find a suitable solution. I am hopeful for a suggestion?
I think this error comes from an AST transform that references the older signature of GeneralUtils#propX. This method used to return Expression and was changed to return PropertyExpression.
The bridge method for binary compatibility was missing in groovy-eclipse. https://github.com/groovy/groovy-eclipse/commit/f6f448675d95f858b4ec65b6fc8e55f27ccaaa94

Swift Package Manager (package successfully added, but Module not found)

I'm new in Swift. I want to create iOS app that can connect to PostgreSQL database. First I found library https://github.com/vapor/postgresql.git that should be added to my project via Swift Package Manager. Using tutorial I added required library to my project successfully (File -> Swift Packages -> Add Package Dependency):
list of added packages from SPM
But when I try to import this module into my view controller, Xcode shows error that module is not found:
not found
I tried several times to rebuild my project, created new project just for testing this issue. Also I found information about build phases and added this lib as a dependency:
build phases
But I still get error: "No such module PostgreSQL".
Can anyone help me?
I found solution by myself. I compiled C static library "libpq" (can be found in PostgreSQL sources) and added it to my swift project. Included this library by adding special bridging header file. Finally I got what I wanted.
P.S. If someone what to repeat, he or she should know: static C library must be compiled for iOS device architecture (and also in iOS simulator architecture which differs from iOS device arch.).

Angular Dart Tutorial - Unable to find modules for some sources

I'm trying to follow the Angular Dart tutorial (https://webdev.dartlang.org/angular/tutorial/toh-pt1) but got stuck after adding some html that makes use of the ngModel directive.
According to the tutorial in order to make use of the ngModel directive one has to add "angular_forms: ^2.0.0" to the pubspec.yaml, import 'package:angular_forms/angular_forms.dart' and add "formDirectives" to the component directives. I did all of that including running "pub get" to get the dependencies but when I run "webdev serve" I get the following error:
[SEVERE] build_web_compilers|entrypoint on test/app_test.dart (cached):
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).
What am I missing?
I had the same the problem. I don't think it mentions explicityly in the tute but after adding angular_forms dependency to the pubspec.yaml file, you need to pull in this new dependency with:
pub get
Hope it helps!

swift pod update Google Messaging generates error Use of undeclared type

I updated my project pods to get the latest version of Google Messaging, but now I'm getting multiple errors while building my project:
Use of undeclared type 'GGLInstanceIDDelegate'
Use of undeclared type 'GCMReceiverDelegate'
Use of unresolved identifier 'GGLContext'
Use of unresolved identifier 'GGLContext'
Use of unresolved identifier 'GCMConfig'
Use of unresolved identifier 'GCMService'
Use of unresolved identifier 'GCMPubSub'
Use of unresolved identifier 'GGLInstanceIDConfig'
Use of unresolved identifier 'GGLInstanceID'
Use of unresolved identifier 'kGGLInstanceIDRegisterAPNSOption'
Use of unresolved identifier 'kGGLInstanceIDAPNSServerTypeSandboxOption'
Use of unresolved identifier 'GGLInstanceID'
Use of unresolved identifier 'kGGLInstanceIDScopeGCM'
Use of unresolved identifier 'GCMService'
Use of unresolved identifier 'GCMService'
Use of unresolved identifier 'GGLInstanceID'Use of unresolved identifier 'kGGLInstanceIDScopeGCM'
Here is the result of the pod update command:
Analyzing dependencies
Downloading dependencies
Using GGLInstanceID (1.2.1)
Installing Google 2.0.4 (was 2.0.4)
Using GoogleCloudMessaging (1.2.0)
Using GoogleIPhoneUtilities (1.2.1)
Using GoogleInterchangeUtilities (1.2.1)
Installing GoogleMaps 2.0.1 (was 1.13.2)
Installing GoogleMobileAds (7.8.0)
Using GoogleNetworkingUtilities (1.2.1)
Using GoogleSymbolUtilities (1.1.1)
Using GoogleUtilities (1.3.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 10
total pods installed.
And here is the content of my podfile:
target 'myProject' do
source 'https://github.com/CocoaPods/Specs.git'
pod 'GoogleMaps'
pod 'Google/CloudMessaging'
end
I tried to run pod update again but the result remains the same. Perhaps a modification on the API entry points is needed?
I don't know exactly what can I do, any help will be more than appreciated!
Based from this thread, if you encountered Use of undeclared type 'GGLInstanceIDDelegate' error, make sure you add a bridge header in Build Settings.
You have to set the Bridging Header in the Xcode Build Settings under
"Swift Compiler Generation" -> "Objective-C Bridging Header" like
this:
"$(SRCROOT)/$(PROJECT_NAME)/ObjCBridgingHeader.h"
You can check my answer in other SO post. It states that error Use of unresolved identifier usually occurs when your new class has a different Target(s) from the other one. It might have a testing target and the other doesn't. You have to include all of your classes in the testing target or none of them.
Check these related SO threads which might help:
"Use of undeclared type" in Swift, even though type is internal, and exists in same module
For me, I encountered this error when my test target did not have some swift files that my app build target had in compile sources. It was very confusing because the 'undeclared type' was being used in so many other places with no problem, and the error seemed vague. So solution there was of course to add the file containing the 'undeclared type' to the test target.
Completely unrelated error using coredata
Hope this helps!
Finally I found the reason why I had those errors while updating my pods...
Google updated from GCM to Firebase and changed their API entry points, so I need to change everything to match Firebase new Cloud messaging implementation !

How do I reference a UWP+NET46 portable library from a .NET 4.6 console application?

I have a portable class library project that targets .NET 4.6 and Universal Windows Platform. This class library contains just one class with the following line of code in its constructor:
Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()));
Now I create a new .NET 4.6 console application project in the same solution and add a project reference to the portable class library. Calling the method that houses the above line of code results in the following exception at runtime:
Could not load file or assembly 'System.IO.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
What am I doing wrong here? There are no compile-time errors or warnings.
Things I have tried: add missing(?) NuGet package manually
It seems that System.IO.FileSystem is a library delivered via NuGet, as part of the Microsoft.NETCore mega-package. Okay, perhaps I need to explicitly add this package to any project that uses my portable class library. I attempt to do so.
Could not install package 'Microsoft.NETCore.Platforms 1.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
No luck with this approach.
Things I have tried: create a project.json file
While there is no clear info on the web, I read a few tidbits about a new project.json based NuGet harness or build system. Just to experiment, I created the following project.json file in my console application project:
{
"dependencies": {
},
"frameworks": {
"net46": { }
},
"runtimes": {
"win-anycpu": { }
}
}
It works! The runtime error goes away! However, I soon found that this was either not the right solution or not a complete solution. I started writing some code to read configuration section values, which involved making use of the IConfigurationSectionHandler interface, and got the following compile-time error:
error CS0246: The type or namespace name 'IConfigurationSectionHandler' could not be found (are you missing a using directive or an assembly reference?)
This interface is part of the System assembly. I see a reference to this assembly, but it has a yellow exclamation mark icon, and a warning appears in the warnings window:
The referenced component 'System' could not be found.
This is where I ran out of ideas. Am I missing something totally obvious?
I have found the solution. My initial attempt was to install the Microsoft.NETCore package into the console application, resulting in the error shown in my original post.
However, if I install only the narrowly-scoped packages, e.g. System.IO.FileSystem, then I achieve success and the application works correctly. Apparently there is something special about the Microsoft.NETCore "master package" that prevents it from correctly installing into dependent projects.