for programmers, the first project to come into contact with is Hello World, and our first project here is also created from Hello Word.1. Project CreationRun the Eclipse.exe file, open the Dev tool Eclipse, select the project storage location, the interface is as followsAfter you open eclipse, select File-new--android Applicaton project to create an Android proj
1.
Download the android development environment package from http://developer.android.com/sdk/index.html on the official website and automatically decompress and install it.
ADT plug-ins and ndk plug-ins are installed:
In the eclipse toolbar, find help-> install new software,
In the Add repository dialog box, set the name as needed, and enter location:
Https://dl-ssl.google.com/android/eclipse/
Select the
A concise development tutorial on Android III: the first application Hello world has introduced the Hello World example, which has a slightly different definition of the two Hello World layout:
Android:id= "@+id/text"
Android:layout_width= "Match_parent"
android:layout_height= "Match_parent"
Android:gravity= "Cen
The following classes could not be instantiated:-Android.support.v7.internal.widget.ActionBarOverlayLayoutJava.lang.ClassNotFoundException:android.support.v4.view.ViewPropertyAnimatorListenerAt Org.jetbrains.android.uipreview.ModuleClassLoader.load (moduleclassloader.java:127)At Com.android.tools.idea.rendering.RenderClassLoader.findClass (renderclassloader.java:53) ............ Most of this is said to add V4 support, to install, but actually res/values/styles.xmlIn the file A base is missing .
Package Com.example.testapk;import Android.app.activity;import Android.os.bundle;import Android.widget.TextView; public class Mainactivity extends activity { /** event is first created after the call * /@Override public void OnCreate (Bundle Savedinstancestate) { super.oncreate (savedinstancestate); TextView TV = new TextView (this); Tv.settext ("Hello, Android"); Setcontentview (TV); } }
__cplusplus} #endif #endifCom_somnus_androidtest_jni_jnitest.c#include *env, Jobject mstring) {return (*env)- >newstringutf (env, "helloworld! I am from JNI! " );}New Android.mk FileLocal_path: = $ (call my-dir) include $ (clear_vars) #LOCAL_MODULE表示生成的库的名字, the preceding lib and suffix names do not have to be written local_module := helloworldlocal_src_files:= com_somnus_androidtest_jni_jnitest.cinclude $ (build_shared_library) Now we're going to start compiling the codeOpen Jnitest.javaor
name strictly into the activity class, and, all inherit from Baseactivity, for abstract to the parent class of thinking mode can help us save a lot of code, use Baseactivity and Basefragment, You can put some activity or fragmentUnified operations into the parent class, such as the entire application of SD card business, unified UI modification operations, unified permissions operations, and so on, anyway, 10 apps have nine is this structure, there is a problem (MU class nets teacher said, haha
Enter edit mode and enter at the beginning of the current line
A
go to edit mode and enter at the end of the current line
O
Enter edit mode , starting at the next line of the current line
O
Enter edit mode , starting at the top line of the current line
: (colon)
Enter Command mode
W
Save File
Q
Exit the VIM editor
Q!
Force exit from the Vim editor without sav
The following classes could not be instantiated:-Android.support.v7.internal.widget.ActionBarOverlayLayoutJava.lang.ClassNotFoundException:android.support.v4.view.ViewPropertyAnimatorListenerAt Org.jetbrains.android.uipreview.ModuleClassLoader.load (moduleclassloader.java:127)At Com.android.tools.idea.rendering.RenderClassLoader.findClass (renderclassloader.java:53)............Most of this is said to add V4 support, to install, but actuallyres/values/styles.xmlIn the fileA base is missing ...htt
The following classes could not be instantiated:-Android.support.v7.internal.widget.ActionBarOverlayLayoutJava.lang.ClassNotFoundException:android.support.v4.view.ViewPropertyAnimatorListenerAt Org.jetbrains.android.uipreview.ModuleClassLoader.load (moduleclassloader.java:127)At Com.android.tools.idea.rendering.RenderClassLoader.findClass (renderclassloader.java:53)............Most of this is said to add V4 support, to install, but actuallyres/values/styles.xmlIn the fileA base is missing ...htt
Tutorialhttps://www.jianshu.com/p/bf77cb5ce70bPlaces to be aware ofJDK Directory LookupThe JDK directory is copied to the tool directory (JDK can be copied, no other involved)https://www.jianshu.com/p/bf77cb5ce70bInstallation path of the JDK under Mac46636769Setting environment variableshttps://segmentfault.com/q/1010000002948042If you create an empty project, you may not be able to create it. Create a template project and try it.Set ADB environment variables71057276. Bash_profile Open Position7
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.