快捷导航

安卓Studio初次使用

我的安卓手机到哪去了..一拖动那个十字架就报空指针nulljava.lang.NullPointerException        atcom.android.tools.idea.uibuilder.surface.CanvasResizeInteraction.(CanvasResizeInteraction.java:103)        atcom.android.tools.idea.uibuilder.surface.InteractionManager$Listener.mousePressed(InteractionManager.java:446)        atjava.awt.Component.processMouseEvent(Component.java:6530)        atjavax.swing.JComponent.processMouseEvent(JComponent.java:3324)        atjava.awt.Component.processEvent(Component.java:6298)        atjava.awt.Container.processEvent(Container.java:2236)        atjava.awt.Component.dispatchEventImpl(Component.java:4889)        atjava.awt.Container.dispatchEventImpl(Container.java:2294)        atjava.awt.Component.dispatchEvent(Component.java:4711)        atjava.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)        atjava.awt.LightweightDispatcher.processMouseEvent(Container.java:4522)        atjava.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)        atjava.awt.Container.dispatchEventImpl(Container.java:2280)        atjava.awt.Window.dispatchEventImpl(Window.java:2746)        atjava.awt.Component.dispatchEvent(Component.java:4711)        atjava.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)        atjava.awt.EventQueue.access$500(EventQueue.java:97)        atjava.awt.EventQueue$3.run(EventQueue.java:709)        atjava.awt.EventQueue$3.run(EventQueue.java:703)        atjava.security.AccessController.doPrivileged(NativeMethod)        atjava.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)        atjava.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)        atjava.awt.EventQueue$4.run(EventQueue.java:731)        atjava.awt.EventQueue$4.run(EventQueue.java:729)        atjava.security.AccessController.doPrivileged(NativeMethod)        atjava.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)        atjava.awt.EventQueue.dispatchEvent(EventQueue.java:728)        atcom.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795)        atcom.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:627)        atcom.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)        atjava.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)        atjava.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)        atjava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)        atjava.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)        atjava.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)        atjava.awt.EventDispatchThread.run(EventDispatchThread.java:82)Gradlesyncfailed:Couldnotfindmethodandroid()forarguments[build_f2uiel5fv19yxv4mzot8n06jd$_run_closure3@6d1da161]onrootproject'HelloWorld'oftypeorg.gradle.api.Project.                ConsultIDElogformoredetails(Help|ShowLog)这是buider.gradle文件//Top-levelbuildfilewhereyoucanaddconfigurationoptionscommontoallsub-projects/modules.buildscript{repositories{jcenter()}dependencies{classpath'com.android.tools.build:gradle:2.3.3'//NOTE:Donotplaceyourapplicationdependencieshere;theybelong//intheindividualmodulebuild.gradlefiles}}allprojects{repositories{jcenter()}}taskclean(type:Delete){deleterootProject.buildDir}android{signingConfigs{}compileSdkVersion23buildToolsVersion'26.0.0'dexOptions{incrementaltrue}compileOptions{sourceCompatibilityJavaVersion.VERSION_1_7targetCompatibilityJavaVersion.VERSION_1_7}defaultConfig{minSdkVersion25}productFlavors{}}dependencies{}

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员1

compileSdkVersion23
buildToolsVersion'26.0.0'
minSdkVersion25
你这三个参数有问题啊,Gradlesyncfailed报错了。至于空指针异常我也不知道那是什么鬼,你先把参数改对后同步一下,看下有没有用吧
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP