Osmdroid Cannot resolve symbol for DefaultResourceProxyImpl and ResourceProxy - openstreetmap

In the IDE of Android Studio when I insert the import:
import org.osmdroid.DefaultResourceProxyImpl;
import org.osmdroid.ResourceProxy;
I get the error "Cannot resolve symbol ...."
All other imports of org.osmdroid.* are ok, but not for the 2 import above.
My build.gradle implements:
implementation 'org.osmdroid:osmdroid-android:6.1.3-SNAPSHOT'
implementation 'org.osmdroid:osmdroid-android:6.1.3'
implementation 'org.osmdroid:osmdroid-wms:6.1.3'
implementation 'org.osmdroid:osmdroid-mapsforge:6.1.3'
implementation 'org.osmdroid:osmdroid-geopackage:6.1.3'
//implementation 'org.osmdroid:osmdroid-third-party:6.1.3'
implementation 'org.osmdroid:osmdroid-shape:6.1.3'
My question is What to implement more to solve the problem?
Thank you in advance.
Fabio

The resource proxy was removed years ago. It's no longer needed since osmdroid switched to the android archive (AAR) format vs a jar. There is no replacement as the APIs were updated to no longer require it

Related

Upgrade to cordova-android 11: Plugin cordova-plugin-video-editor will not work anymore

I just updating my ionic project to Cordova Android 11 (because of android-targetSdkVersion which must be > 30 this fall).
Seems that good old plugin cordova-plugin-video-editor will not work anymore when building the project:
import net.ypresto.androidtranscoder.MediaTranscoder;
^
/Users/olivierschmid/AppDev/b2c-customer-app/platforms/android/app/src/main/java/org/apache/cordova/videoeditor/CustomAndroidFormatStrategy.java:6: error: package net.ypresto.androidtranscoder.format does not exist
import net.ypresto.androidtranscoder.format.MediaFormatStrategy;
^
/Users/olivierschmid/AppDev/b2c-customer-app/platforms/android/app/src/main/java/org/apache/cordova/videoeditor/CustomAndroidFormatStrategy.java:7: error: package net.ypresto.androidtranscoder.format does not exist
import net.ypresto.androidtranscoder.format.OutputFormatUnavailableException;
^
/Users/olivierschmid/AppDev/b2c-customer-app/platforms/android/app/src/main/java/org/apache/cordova/videoeditor/CustomAndroidFormatStrategy.java:14: error: cannot find symbol
public class CustomAndroidFormatStrategy implements MediaFormatStrategy {
Does someone have a tipp what alternative I can try (for compressing videos)? There seem not to be many options?
Thanks! Oli
Have you already tried adding "cordova-plugin-androidx-adapter"?

Source "#openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File import callback not supported

I've imported the Open Zeppelin ERC721 token standard into my VS Code with the Solidity extension, but see the following warnings on all my OZ import statements:
Screenshot of error
Why is this happening and what is the workaround for this warning?
What I've tried:
change default workspace compiler to localNodeModule (began to throw other warnings like on the pragma solidity line)
Example of solution I've tried
Just install the Solidity+Hardhat Extension ,this will take care of the errror.
run below command
npm install #openzeppelin/contracts
Change the import line like this
import "./node_modules/#openzeppelin/contracts/token/ERC721/ERC721.sol";
You could try this solution here, the only one that helped me.
https://stackoverflow.com/a/72241149/7537543
When you compile programmatically using solc, new syntax was introduced, which you have to include in compile.js.
// New syntax (supported from 0.5.12, mandatory from 0.6.0)
var output = JSON.parse(
solc.compile(JSON.stringify(input), { import: findImports })
);
You should have a helper function for finding imports
function findImports(relativePath) {
//my imported sources are stored under the node_modules folder!
const absolutePath = path.resolve(__dirname, 'node_modules', relativePath);
const source = fs.readFileSync(absolutePath, 'utf8');
return { contents: source };
}
Unfortunately I ran into this error too & just gave the path manually:
import "/home/ev1lclow3n/node_modules/#openzeppelin/contracts/token/ERC721/ERC721.sol";
This solved my error.
(I'm a linux user so path may differ for you)
Thanks ;-)
you have to manually guide the open zepplin import to its source file if you have it downloaded in your node modules then all you have to do is to change its path like this " ../node_modules/" and also make sure to use the latest extension of juan blanco's solidity extension and solidity and hardhat extension and if you are following a tutorial your first lines of codes would probably be import "hardhat/console.sol"; all you have to do here is to manually direct only this file to its designated place and the others would do it by themselves.
What you have to do is:
If you have "Solidity by Juan Blanco" for Truffle and "Solidity by Nomic Foundation" for Hardhdat, and if you are using Hardhat, disable the one by Juan Blanco and just use the one by Nomic Foundation, it just worked for me.
Screenshot
Make sure to create a Hardhat project (npx hardhat) and install:
npm install --save-dev "hardhat#^2.12.7" "#nomicfoundation/hardhat-toolbox#^2.0.0"
npm i #openzeppelin/contracts
Ok. That was a dumb question. Two things you have to do:
(1) Install the OZ library via
npm install #openzeppelin/contracts
(2) If you see Error HH606 (i.e. project can't compile), it's likely because The Solidity version pragma statement in these files doesn't match any of the configured compilers in your config.. Ensure that your pragma version matches the version in your hardhat config.
Hope this helps.

access to a rest webservice in grails 4.0.1

I have a lot of successful rest accesses in grails 2.x.x
I simply coded
import grails.plugins.rest.client.*
import grails.util.Holders
import org.codehaus.groovy.grails.web.json.JSONObject
import org.codehaus.groovy.grails.web.json.JSONArray
and Classes JSONObject, JSONArray, RestBuilder, RestResponse where available for further use.
What are the corresponding imports in 4.0.1 and what jars resp. what lines in build.gradle are necessary?
What are the corresponding imports in 4.0.1 and what jars resp. what
lines in build.gradle are necessary?
Grails 4 offers better options than to interact with the classes you asked about but to answer the question as asked...
org.grails.web.json.JSONObject is in grails-web-common-4.0.1.jar. Use import org.grails.web.json.JSONObject.
org.grails.web.json.JSONArray is in grails-web-common-4.0.1.jar. Use import org.grails.web.json.JSONArray.
grails.plugins.rest.client.RestBuilder is in grails-datastore-rest-client-6.1.12.RELEASE.jar. Use import grails.plugins.rest.client.RestBuilder.
grails.plugins.rest.client.RestResponse is in grails-datastore-rest-client-6.1.12.RELEASE.jar. Use import grails.plugins.rest.client.RestResponse.
Depending on what other dependencies you may have in your project those may or may not be pulled in transitively so you may not need to add them to your build.gradle directly. The most likely scenario is you won't need to add anything to pull in grails-web-common-4.0.1.jar but you probably will need to pull in grails-datastore-rest-client-6.1.12.RELEASE.jar which can be done by adding the following to your build.gradle:
compile "org.grails:grails-datastore-rest-client:6.1.12.RELEASE"
If you want to pull in grails-web-common explicitly you could use the following:
compile "org.grails:grails-web-common:4.0.1"
If you are using the BOM correctly, you could simplify that with the following:
compile "org.grails:grails-web-common"
I hope that helps.

Can't find LineGraphView, GraphViewSeries, GraphViewData

I'm starting to work with GraphView 4.2.2. I found some examples that use the following imports:
import com.jjoe64.graphview.GraphView.GraphViewData;
import com.jjoe64.graphview.GraphViewSeries;
import com.jjoe64.graphview.LineGraphView;
However, in my implementation (gradle 4.7, sdk 27), the symbols can't be resolved.
What am I missing? Are these classes no longer supported in GraphView 4.2.2. ?
Do I need to downgrade?
Add this line into the dependencies block of the "build.gradle" file under your app directory :
implementation 'com.jjoe64:graphview:4.2.2'

NestableException cannot be resolved when using apache.commons.configuration

Im using the following:
import java.util.Collections;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.configuration.XMLConfiguration;
and i get:
The type org.apache.commons.lang.exception.NestableException cannot be resolved. It is indirectly referenced from required .class files
Im using eclipse...
how can i resolve this? he offers me to Configure build path but i dont really know how to solve this collision from there.....
Problem solved...
had to download the commons-lang-2.4.jar and include in project.
couldnt be more simple than that....
Sounds like what is really needed is an update to the PropertiesConfiguration lib so that it gets along with latest lang lib. If its a "free" lib then it might not be coming, considering that its been years since last reply on this thread and this is still happening.
I have been having this issue as well, and have not found a way of resolving it apart from the aforementioned inclusion of both lang libs ... which does not seem to present any problems, though strict repository framework implementations (like Maven) might have problems with both libs included.
Had to remove commons-lang3-3.4 from my Java Build Path and added 2.6 , it solved the problem!