简体   繁体   中英

Anyone know how I can run an android sample app?

I'm fairly new to android development using Android Studio. The examples online say to build with Gradle. I choose Gradle when importing the project but then I get an error saying that it is not a Gradle based project. Does anyone know how I can get over this to run it on my phone?

app module目录和project root目录中都选择一个要导入的具有build.gradle文件的示例项目。

Strongly recommend rather than importing an existing project, you create a new one from scratch yourself, following along with a tutorial.

Here's a really good first tutorial for Android Studio which is recent (August, 2014) as of this question, so it will all be relevant to the current version of Android Studio.

http://www.codeproject.com/Articles/801078/Hello-Android-The-Hello-World-Application

As far as getting the app onto your phone you can either (a) plug in the USB cable from the phone to your PC and run from Android Studio, or (b) email the app's APK file as an attachment to any email address you check on your phone (such as gmail for example). For the email method, you also need to change a security option to allow apps from unknown sources.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM