We recently upgrade Xcode to version 13. Version 13.3.1
When we build the project we get the error below -
failed to emit precompiled header '/Users/XYZ/Library/Developer/Xcode/DerivedData/Projectname-enjky/Build/Intermediates.noindex/PrecompiledHeaders/ProejctnameTests-Bridging-Header-swift_32WPX9UNF3APQ-clang_3TAMX14OS8HQU.pch' for bridging header '/Users/XYZ/Documents/ProjectnameTests-Bridging-Header.h'
/Users/XYZ/Documents/ProjectnameTests-Bridging-Header.h:5:9: note: in file included from /Users/XYZ/Documents/ProjectnameTests-Bridging-Header.h:5:
#import "GTLRCloudendpoint.h
Our coding language is SWIFT. There is an Ojective-C module that is being imported. We have looked at all the suggestions here.
ensured that the deployment target is 11
$(inherited) non-recursive to Search Path -> Header Search Paths
${PODS_ROOT} recursive to Search Path -> User Header Search Paths
But still get this error. Please help.
Related
I would like to learn minecraft mod development, but there is an error with downloading the mappings
The error message is:
Could not resolve all files for configuration ':runtimeClasspathCopy'.
Could not find net.minecraftforge:forge:1.12.2-14.23.5.2860_mapped_snapshot_20180814-1.12.
Searched in the following locations:
- file:~/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.12.2-14.23.5.2860_mapped_snapshot_20180814-1.12/forge-1.12.2-14.23.5.2860_mapped_snapshot_20180814-1.12.pom
- file:~/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.12.2-14.23.5.2860_mapped_snapshot_20180814-1.12/forge-1.12.2-14.23.5.2860_mapped_snapshot_20180814-1.12.jar
Required by:
project :
Possible solution:
Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
The directories specified does not exist. Also I tried downloading and importing the MCP instead of using an IntelliJ Plugin for Minecraft. The same error occurred while using this but there was a few more links (that leads to a webpage) that does not exists ("error 404 not found") if I clicked them.
The line in build.gradle which specifies the mappings used is at the moment:
mappings channel: 'snapshot', version: '20180814-1.12'
It was a stable version before and there was the same errors.
Does anyone know what I can do about it?
i had the same problem and i fix it by changing it to java 1.8 eclipse temurin
btw sorry for my bad english
Can anyone please help me with this? I dont know what does this mean.
To give you a back up I updated my sdk with 23 and then i got 101 errors regarding HTTPClient not being resolved. So i followed this link to remove that then I have this error of which i have no clue where to start with.
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\build-tools\23.0.1\dx.bat --dex --no-optimize --output F:\sagarDevanga\workspace\AndNrby\app\build\intermediates\dex\debug --input-list=F:\sagarDevanga\workspace\AndNrby\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lorg/apache/http/ConnectionClosedException;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Make sure that your adt supports the version of api that you are running. See this link : https://developer.android.com/tools/support-library/index.html
To fix you should check in libs (.jar) and in your build.gradle if there are some libraries duplicated. This error happen tipicaly when you add a copy of the same library or a library that include a copy of another library that you have already added
Update also your support libs from SDK
Ok I have updated the question's title also so that other people also find it useful.So I will write a detailed answer about how this error occured in my project and the fixes I did and how I finally derived the answer.
1) I updated the SDK and then started to compile my project using the latest api i.e API 23. You can do that by going to File -> Project Structure ->Select your module.
Now in the right hand side window under properties the top two properties can be changed using in the drop down.
Then click on Apply and Ok.
2) So when you do this your app's build.gradle file will look like this. And now everything looks good. It will compile also. But when you run the project you will get a lot of errors by this name Error:(17, 35) error: package org.apache.http.impl.client does not exist Obviously if you are using them in your async tasks.
3) So when i got this error I did a lot of research here and there and then came across this link and added the HTTP CLIENTS jar files in the libs folder and then tried to run the program I ended up with this problem (problem mentioned in the question).
4) So after diggin around I found that the problem was HTTP methods which i used in the Async task were deprecated in the API 23 hence I landed myself in this mess.
5) Then what I did next fixed the problem for me. Refernce given here.
6) In your module's build.gradle file add this line useLibrary 'org.apache.http.legacy' like below.
7) Wait your still not done. Now go to your main build.gradle file and add this line classpath 'com.android.tools.build:gradle:1.3.1' like this . Now build and compile your project everything runs fine.
8) After all this steps the project works fine but I have a doubt in the last pic that i shared which is of the top level build.gradle file. Whether I should keep both the classpaths or just use this classpath 'com.android.tools.build:gradle:1.3.1' and remove the other one. If any one have any idea on this please help.
9) The problem was that they deprecated the HTTP Clients in the Latest Android API 23. Insted of HTTP Client you have to use HttpUrlConnection but if you want to continue using HTTP client for NOW follow the steps above.
I'm strugling with using jackson-dataformat-xml on android
I have some very basic code that works fine on oracle jre
JacksonXmlModule module = new JacksonXmlModule();
module.setDefaultUseWrapper(false);
XmlMapper xmlMapper = new XmlMapper(module);
First I tried official documentation adapted for gradle (by me, not sure if done correctly):
compile 'com.fasterxml.jackson.core:jackson-core:2.5.4'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.5.4'
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.4'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.5.4'
compile 'org.codehaus.woodstox:woodstox-core-asl:4.4.1'
compile 'javax.xml.stream:stax-api:1.0-2'
Result: gradle fails build time about bundling corelibraries into an application
...
:app:preDexDebug
trouble processing "javax/xml/stream/EventFilter.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
...
2nd attempt trying to follow Sean's answer
(Basicly he repackages corelibs with prefix names and rebuilds jackson-dataformat-xml to use the prefixed names)
compile 'com.fasterxml.jackson.core:jackson-core:2.1.2'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.2'
compile 'com.fasterxml.jackson.core:jackson-databind:2.1.2'
// Repackaged XML-specific libraries
compile 'edu.usf.cutr.android.xml:jackson-dataformat-xml-android:2.1.2'
compile 'edu.usf.cutr.android.xml:stax2-api-android:3.1.1'
compile 'edu.usf.cutr.android.xml:stax-api-android:1.0-2'
compile 'edu.usf.cutr.android.xml:aalto-xml-android:0.9.8'
And build time failed on duplicates
Duplicate files copied in APK META-INF/services/com.fasterxml.jackson.core.ObjectCodec
so added:
packagingOptions {
...
exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
exclude 'META-INF/services/com.fasterxml.jackson.core.ObjectCodec'
}
When adding the exclusions it builds and deploys, but fails runtime on below stackdump (AFAIK it cant find the SAX provider, even tho it is added to the classpath to my understanding)
edu.usf.cutr.javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found
at edu.usf.cutr.javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)
at edu.usf.cutr.javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176)
at edu.usf.cutr.javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
at edu.usf.cutr.javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:97)
at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:85)
at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:82)
at com.fasterxml.jackson.dataformat.xml.XmlMapper.<init>(XmlMapper.java:46)
What is the proper way to move forward on either #1 or #2?
Number 2 is the correct approach (Android doesn't like it when you include classes in the official Java package namespace - but then again, I wrote the original answer so I'm biased ;) ).
I believe the FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found error is due to a bug in the Android build tools. In previous versions of ADT for Eclipse and Gradle plugin < 0.7.0 the /META-INF/* files are stripped from the JARs during the build process. It seems like >= v0.7.0 shouldn't have the problem according to Google, but from others' reports it sounds like it still may be problematic, and could potentially remove the META-INF/services/javax.xml.stream.XMLInputFactory file, which is required for the platform to register Aalto.
Try the workaround mentioned in AOSP issue 59658 comment 22:
right click on /src/main (where you have /java and /res folders),
select New > Folder > Java Resources Folder,
click Finish (do not change Folder Location),
right click on new /resources folder,
select New > Directory
enter "META-INF" (without quotes),
right click on /resources/META-INF folder,
select New > Directory
enter "services" (without quotes)
copy any file you need into /resources/META-INF/services
For you, in step 10 above you'd need to copy this file into /resources/META-INF/services. In case the file link is broken in the future, the name of the file is javax.xml.stream.XMLInputFactory and it consists of a single line:
com.fasterxml.aalto.stax.InputFactoryImpl
EDIT
If you get a "Error:duplicate files during packaging of APK... Path in archive: META-INF/services/javax.xml.stream.XMLInputFactory", you can try telling Gradle to keep the first occurrence with:
android {
packagingOptions {
pickFirst 'META-INF/services/javax.xml.stream.XMLInputFactory'
}
}
EDIT 2
This bug may be affecting "pickFirst". Please make sure you're running the latest version of Android Studio, and update your local tools and Android Gradle plugin to make sure you're running the most recent version of the tools. This may be fixed in Android Studio 1.3 RC1.
I have attempted to add XmlPull support to jackson xml. Find the forked project here:
https://github.com/finvu/jackson-dataformat-xml
Currently, only supported for version 2.9.6. (clone the branch jackson-dataformat-xml-2.9.6-XmlPull)
Sorry, I am not able to provide detailed documentation due to time constraints. If you have knowledge of git and maven to pull a specific branch and build the jar, then it should be relatively easy.
To those who will be in need of this in the future:
first integrate Jitpack in Your Android app, following their instructions:
https://jitpack.io/
Then paste teh GitHub url of jackson-dataformat-xml on Jitpack sites' corresponding text box. GitHub url is:
https://github.com/FasterXML/jackson-dataformat-xml.
That's it! Enjoy the result. :)
I followed the documentation for using app.yaml with Java which claims that this should work and that it will generate web.xml and appengine-web.xml automatically. However, it doesn't seem to work and it doesn't mention which tool will generate the files.
I first tried a mvn clean install which errors out because the .xml files are missing:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project roger-analytics: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
I then tried to run the local development server:
$ gcloud preview app run app.yaml
ERROR: (gcloud.preview.app.run) An error occurred while parsing file: [/Users/blixt/src/roger-api/module_analytics/app.yaml]
Unexpected attribute 'servlet' for object of type URLMap.
in "/Users/blixt/src/roger-api/module_analytics/app.yaml", line 7, column 12
(I get the same error from dev_appserver.py . by the way)
It appears that app.yaml isn't supported after all. Am I missing something, or was support removed without updating the documentation?
Here's my app.yaml file, which is intended to run as a module in my Google Cloud App Engine project (along with other modules that have Python and Go runtimes):
module: analytics
runtime: java
api_version: 1
handlers:
- url: /*
servlet: im.rgr.roger.RogerAnalytics
login: admin
secure: always
system_properties:
java.util.logging.config.file: WEB-INF/logging.properties
There are several issues at play here. I'll describe various facts that group together to create a constellation of SDK edge-case goodness (this information is current as of SDK 1.9.21):
In order to deploy using the Java SDK's appcfg.sh, you'll need to have app.yaml inside the war/WEB-INF/ folder.
appcfg.py complains Unexpected attribute 'servlet' for object of type URLMap..
gcloud preview app deploy uses appcfg.py (or the same codebase) and therefore also complains in the same manner
So, in conclusion, you'll need to use appcfg.sh
Hi I am using embedded Jetty 8.x In Eclipse and getting this error, while making simple Hello web application with JSP and Servlet. Am I missing some jar in Build Path ?
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0_20\jre
Detected OS: Windows XP
parsing buildfile jar:file:/C:/Documents%20and%20Settings/ashish.s/NewEclipseJuno/JServer/WebContent/WEB-INF/lib/ant-1.8.3.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/Documents%20and%20Settings/ashish.s/NewEclipseJuno/JServer/WebContent/WEB-INF/lib/ant-1.8.3.jar!/org/apache/tools/ant/antlib.xml from a zip file
parsing buildfile jar:file:/C:/Documents%20and%20Settings/ashish.s/My%20Documents/Downloads/ant-1.8.3.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/Documents%20and%20Settings/ashish.s/My%20Documents/Downloads/ant-1.8.3.jar!/org/apache/tools/ant/antlib.xml from a zip file
Project base dir set to: C:\Documents and Settings\ashish.s\NewEclipseJuno\JServer
[javac] warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
I'm going to go ahead and put some more detail in an answer as I also faced the same issue (or close enough) where the application worked fine when run form eclipse and threw
java.lang.NoSuchMethodError: org.apache.jasper.compiler.JspUtil.expandClassPath(Ljava/util/List;)Ljava/util/List;
when exported and running form a runable jar.
The soloution (as mentioned in the comments above) was to add jasper-compiler-*.jar and jasper-runtime-*.jar to the class path in eclipse before exporting (Where the asterixis are version numbers). these I found respectively at: jasper-compiler.jar and jasper-runtime.jar
If these links are dead at the time of reading then a Google search (or using a service like jar finder) should help you locate the required jars mentioned above.