以上就是给各位分享IntelliJIDEA:Error:java:Compilationfailed,同时本文还将给你拓展AndroidError:Executionfailedfortask'':a
以上就是给各位分享IntelliJ IDEA:Error:java: Compilation failed,同时本文还将给你拓展Android Error:Execution failed for task '':app:compileDebugJavaWithJavac'' 解决方案 总结、android – 失败[INSTALL_FAILED_UPDATE_INCOMPATIBLE]后跟DELETE_FAILED_INTERNAL_ERROR、com.intellij.psi.compiled.ClassFileDecompilers的实例源码、com.intellij.uiDesigner.compiler.AlienFormFileException的实例源码等相关知识,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!
本文目录一览:- IntelliJ IDEA:Error:java: Compilation failed
- Android Error:Execution failed for task '':app:compileDebugJavaWithJavac'' 解决方案 总结
- android – 失败[INSTALL_FAILED_UPDATE_INCOMPATIBLE]后跟DELETE_FAILED_INTERNAL_ERROR
- com.intellij.psi.compiled.ClassFileDecompilers的实例源码
- com.intellij.uiDesigner.compiler.AlienFormFileException的实例源码
IntelliJ IDEA:Error:java: Compilation failed
Error:java: Compilation failed: internal java compiler error
编译错误。原因:java complier 设置的问题,编译的jdk版本与项目设置的不一致导致
解决:修改java complier配置
Android Error:Execution failed for task '':app:compileDebugJavaWithJavac'' 解决方案 总结
1、升级更新buildToolsVersion 到最新版本
2、升级Android Studio 2.2.2版本,JDK 1.8版本
3、配置JAVA_HOME路径
然并卵没有解决我个人的问题
gradlew compileDebug --stacktrace 可以用于查看堆栈的错误信息,然后再去网上继续找寻错误信息。
把命令gradlew compileDebug --stacktrace 改成 gradlew compileDebugJavaWithJavac
居然把具体的错误信息打印出来了
然后更改,解决问题
像我遇到的问题是,刷新的时候都没有问题,运行的时候就出现我们标题的问题,然而解决了几次这样错误以后,发现一般来说只有manefest的权限重复这种类型错误,不打印错误信息出来,是看不到真正的错误的。gradle和studio升级版本越来越高以后,对权限要求都不能重复了,感觉算不算坑,有点追求完美?以前版本是可以兼容,内部应该帮你合并了的。
环境:studio3.0.1 gradle 4.1版本
android – 失败[INSTALL_FAILED_UPDATE_INCOMPATIBLE]后跟DELETE_FAILED_INTERNAL_ERROR
此外,运行窗口显示“Failure [INSTALL_Failed_CONFLICTING_PROVIDER]”
点击确定后,我进入运行窗口:
“DEVICE SHELL COMMAND:pm uninstall com.app.app
DELETE_Failed_INTERNAL_ERROR”
谢谢您的帮助!
解决方法
我建议使用8.1.0版本 – 这解决了我的问题.
例如:
dependencies { compile filetree(include: [''*.jar''],dir: ''libs'') compile ''com.google.android.gms:play-services-gcm:8.3.0'' }
需要更改为:
dependencies { compile filetree(include: [''*.jar''],dir: ''libs'') compile ''com.google.android.gms:play-services-gcm:8.1.0'' }
在build.gradle文件中
com.intellij.psi.compiled.ClassFileDecompilers的实例源码
@Override @NotNull public CharSequence decompile(@NotNull VirtualFile file) { ClassFileDecompilers.Decompiler decompiler = ClassFileDecompilers.find(file); if (decompiler instanceof ClassFileDecompilers.Full) { PsiManager manager = PsiManager.getInstance(DefaultProjectFactory.getInstance().getDefaultProject()); return ((ClassFileDecompilers.Full)decompiler).createFileViewProvider(file,manager,true).getContents(); } if (decompiler instanceof ClassFileDecompilers.Light) { try { return ((ClassFileDecompilers.Light)decompiler).getText(file); } catch (ClassFileDecompilers.Light.CannotDecompileException e) { LOG.warn("decompiler: " + decompiler.getClass(),e); } } return ClsFileImpl.decompile(file); }
@Override public int getStubVersion() { int version = STUB_VERSION; List<ClassFileDecompilers.Decompiler> decompilers = ContainerUtil.newArrayList(ClassFileDecompilers.EP_NAME.getExtensions()); Collections.sort(decompilers,CLASS_NAME_COMParaTOR); for(ClassFileDecompilers.Decompiler decompiler : decompilers) { if(decompiler instanceof Full) { version = version * 31 + ((Full) decompiler).getStubBuilder().getStubVersion() + decompiler.getClass().getName().hashCode(); } } return version; }
@NotNull @Override public FileViewProvider createFileViewProvider(@NotNull VirtualFile file,Language language,@NotNull PsiManager manager,boolean eventSystemEnabled) { ClassFileDecompilers.Decompiler decompiler = ClassFileDecompilers.find(file); if (decompiler instanceof Full) { return ((Full)decompiler).createFileViewProvider(file,eventSystemEnabled); } return new ClassFileViewProvider(manager,file,eventSystemEnabled); }
private static Exception wrapException(InvalidMirrorException e,VirtualFile file) { ClassFileDecompilers.Decompiler decompiler = ClassFileDecompilers.find(file); if (decompiler instanceof ClassFileDecompilers.Light) { PluginId pluginId = PluginManagerCore.getPluginByClassName(decompiler.getClass().getName()); if (pluginId != null) { return new PluginException(e,pluginId); } } return e; }
@Override public int getStubVersion() { int version = STUB_VERSION; List<ClassFileDecompilers.Decompiler> decompilers = ContainerUtil.newArrayList(ClassFileDecompilers.EP_NAME.getExtensions()); Collections.sort(decompilers,CLASS_NAME_COMParaTOR); for (ClassFileDecompilers.Decompiler decompiler : decompilers) { if (decompiler instanceof Full) { version = version * 31 + ((Full)decompiler).getStubBuilder().getStubVersion() + decompiler.getClass().getName().hashCode(); } } return version; }
public void testCancellation() { if (GraphicsEnvironment.isHeadless()) { System.err.println("** skipped in headless env."); return; } final VirtualFile file = getTestFile(PlatformTestUtil.getRtJarPath() + "!/javax/swing/JTable.class"); final IdeaDecompiler decompiler = (IdeaDecompiler)ClassFileDecompilers.find(file); assertNotNull(decompiler); final Alarm alarm = new Alarm(Alarm.ThreadToUse.SWING_THREAD,getProject()); alarm.addRequest(new Runnable() { @Override public void run() { ProgressIndicator progress = decompiler.getProgress(file); if (progress != null) { progress.cancel(); } else { alarm.addRequest(this,200,ModalityState.any()); } } },750,ModalityState.any()); try { FileDocumentManager.getInstance().getDocument(file); fail("should have been cancelled"); } catch (ProcessCanceledException ignored) { } }
@NotNull @Override public FileViewProvider createFileViewProvider(@NotNull VirtualFile file,boolean eventSystemEnabled) { ClassFileDecompilers.Decompiler decompiler = ClassFileDecompilers.find(file); if(decompiler instanceof Full) { return ((Full) decompiler).createFileViewProvider(file,eventSystemEnabled); } return new ClassFileViewProvider(manager,eventSystemEnabled); }
private static Exception wrapException(InvalidMirrorException e,VirtualFile file) { ClassFileDecompilers.Decompiler decompiler = ClassFileDecompilers.find(file); if(decompiler instanceof ClassFileDecompilers.Light) { PluginId pluginId = PluginManagerCore.getPluginByClassName(decompiler.getClass().getName()); if(pluginId != null) { return new PluginException(e,pluginId); } } return e; }
@Override @NotNull public CharSequence decompile(@NotNull VirtualFile file) { ClassFileDecompilers.Decompiler decompiler = ClassFileDecompilers.find(file); if(decompiler instanceof ClassFileDecompilers.Full) { PsiManager manager = PsiManager.getInstance(DefaultProjectFactory.getInstance().getDefaultProject()); return ((ClassFileDecompilers.Full) decompiler).createFileViewProvider(file,true).getContents(); } return decompileText(file); }
@NotNull public static CharSequence decompileText(@NotNull VirtualFile file) { ClassFileDecompilers.Decompiler decompiler = ClassFileDecompilers.find(file); if(decompiler instanceof ClassFileDecompilers.Light) { return ((ClassFileDecompilers.Light) decompiler).getText(file); } return ClsFileImpl.decompile(file); }
com.intellij.uiDesigner.compiler.AlienFormFileException的实例源码
public static List<String> getBuildProcessApplicationClasspath(boolean isLauncherUsed) { final Set<String> cp = ContainerUtil.newHashSet(); cp.add(getResourcePath(BuildMain.class)); cp.addAll(PathManager.getUtilClasspath()); // util cp.add(getResourcePath(Message.class)); // protobuf cp.add(getResourcePath(NetUtil.class)); // netty cp.add(getResourcePath(ClassWriter.class)); // asm cp.add(getResourcePath(ClassVisitor.class)); // asm-commons cp.add(getResourcePath(JpsModel.class)); // jps-model-api cp.add(getResourcePath(JpsModelImpl.class)); // jps-model-impl cp.add(getResourcePath(JpsProjectLoader.class)); // jps-model-serialization cp.add(getResourcePath(AlienFormFileException.class)); // forms-compiler cp.add(getResourcePath(GridConstraints.class)); // forms-rt cp.add(getResourcePath(CellConstraints.class)); // jGoodies-forms cp.add(getResourcePath(NotNullVerifyingInstrumenter.class)); // not-null cp.add(getResourcePath(IXMLBuilder.class)); // nano-xml cp.add(getResourcePath(SequenceLock.class)); // jsr166 cp.add(getJpsPluginSystemClassesPath().getAbsolutePath().replace('\\','/')); //don't forget to update layoutCommunityJps() in layouts.gant accordingly if (!isLauncherUsed) { appendJavaCompilerClasspath(cp); } try { final Class<?> cmdLineWrapper = Class.forName("com.intellij.rt.execution.CommandLineWrapper"); cp.add(getResourcePath(cmdLineWrapper)); // idea_rt.jar } catch (Throwable ignored) { } return ContainerUtil.newArrayList(cp); }
public void read(final Element element,final PropertiesProvider provider) throws Exception { if (element == null) { throw new IllegalArgumentException("element cannot be null"); } if (!Utils.FORM_NAMESPACE.equals(element.getNamespace().getURI())) { throw new AlienFormFileException(); } if(!"form".equals(element.getName())){ throw new UnexpectedFormElementException("unexpected element: "+element); } setId("root"); myClasstoBind = element.getAttributeValue(UIFormXmlConstants.ATTRIBUTE_BIND_TO_CLASS); // Constraints and properties for(Iterator i=element.getChildren().iterator(); i.hasNext();){ final Element child = (Element)i.next(); if (child.getName().equals(UIFormXmlConstants.ELEMENT_BUTTON_GROUPS)) { readButtonGroups(child); } else if (child.getName().equals(UIFormXmlConstants.ELEMENT_inspection_SUPPRESSIONS)) { readinspectionSuppressions(child); } else { final LwComponent component = createComponentFromTag(child); addComponent(component); component.read(child,provider); } } myMainComponentBinding = element.getAttributeValue("stored-main-component-binding"); }
public void read(final Element element,provider); } } myMainComponentBinding = element.getAttributeValue("stored-main-component-binding"); }
public static List<String> getBuildProcessApplicationClasspath() { final Set<String> cp = ContainerUtil.newHashSet(); cp.add(getResourcePath(BuildMain.class)); cp.addAll(PathManager.getUtilClasspath()); // util cp.add(getResourcePath(Message.class)); // protobuf cp.add(getResourcePath(Version.class)); // netty cp.add(getResourcePath(ClassWriter.class)); // asm cp.add(getResourcePath(ClassVisitor.class)); // asm-commons cp.add(getResourcePath(JpsModel.class)); // jps-model-api cp.add(getResourcePath(JpsModelImpl.class)); // jps-model-impl cp.add(getResourcePath(JpsProjectLoader.class)); // jps-model-serialization cp.add(getResourcePath(AlienFormFileException.class)); // forms-compiler cp.add(getResourcePath(GridConstraints.class)); // forms-rt cp.add(getResourcePath(CellConstraints.class)); // jGoodies-forms cp.add(getResourcePath(NotNullVerifyingInstrumenter.class)); // not-null cp.add(getResourcePath(IXMLBuilder.class)); // nano-xml final Class<StandardJavaFileManager> optimizedFileManagerClass = getoptimizedFileManagerClass(); if (optimizedFileManagerClass != null) { cp.add(getResourcePath(optimizedFileManagerClass)); // optimizedFileManager } try { final Class<?> cmdLineWrapper = Class.forName("com.intellij.rt.execution.CommandLineWrapper"); cp.add(getResourcePath(cmdLineWrapper)); // idea_rt.jar } catch (Throwable ignored) { } for (JavaCompiler javaCompiler : ServiceLoader.load(JavaCompiler.class)) { // Eclipse compiler final String compilerResource = getResourcePath(javaCompiler.getClass()); final String name = PathUtilRt.getFileName(compilerResource); if (name.startsWith("ecj-") && name.endsWith(".jar")) { cp.add(compilerResource); } } return ContainerUtil.newArrayList(cp); }
关于IntelliJ IDEA:Error:java: Compilation failed的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于Android Error:Execution failed for task '':app:compileDebugJavaWithJavac'' 解决方案 总结、android – 失败[INSTALL_FAILED_UPDATE_INCOMPATIBLE]后跟DELETE_FAILED_INTERNAL_ERROR、com.intellij.psi.compiled.ClassFileDecompilers的实例源码、com.intellij.uiDesigner.compiler.AlienFormFileException的实例源码的相关知识,请在本站寻找。
本文标签: