= "blocksDescendants" attribute to the root layout of the Item layout. When a dotted line is drawn using shape, solid lines are displayed on models above 4.0.
Description:When the shape is used to draw the dotted line, it can be normally displayed in Graphical Layout, but the model on Android4.0 is displayed as a solid line.
Cause:By default, the hardware acceleration of the Activity is enabled for more than 4.0, so we can turn it off in Manifest. xml.
Solution:Add the following attributes t
Mobile phone Bluetooth control relay wireless lock Iot Android source code android development Android WIFI control detailed annotation test stability no bug, android Android
I. functions:
1. Connect and disconnect Android WIFI, a
Version control is an important part in the process of program upgrade/maintenance.
You need to know the version of the application installed on the device and the versions that can be upgraded.
Other applications-including other programs you release-need to query the system for the version of your application to determine the compatibility between them.
You may also need to query the version of the Service released by your application to display it to users.
The
: @ com.android.dx.command.dexer.Main.main (main.java:199) at Com.android.dx.command.Main.main (main.java:103)That's right. The number of Dex file methods in your app exceeds the maximum limit of 65536, so simply put, the app is bursting.So let's see why this error is caused:In the Android system. All the code for an App is inside a Dex file. Dex is a similar jar of archive files that store many Java -compiled bytecode.Since the
the project directory and a build.gradle file exists for each module.The Build.gradle in engineeringbuildscript {repositories { jcenter() // 声明使用 maven 仓库}dependencies { // 依赖android提供的2.1.0-alpha5的gradle build classpath ‘com.android.tools.build:gradle:2.1.0-alpha5‘}}// 为所有的工程的repositories配置为jcentersallprojects {repositories {jcenter()}}// 清楚工程的任务task clean(type: Delete) {delete rootProject.buildDir}Build.gradle in the module// 这表示该module是一个ap
' //Note:do not place your application dependencies here; they belong //In the individual module Build.gradle files}}allprojects {//Set up the build process for each module. In this example, each module is set to use a //MAVEN warehouse dependent. repositories {Jcenter ()}}The default project directory contains the contents of the Settings.gradle file as above. It is possible that by default, the Settings.gradle file under the project directory does not exist and you can create
package in the local warehouse and open source China maven warehouse.
Sub Modules
You'll find that Android Studio will create your demo module by default, which consists of 3 main parts:
Plugin Android Plugin
Android Android code block, which defines the version build information for the app
Dependencie
Contactscommon used to Geocoder-2.9.jar and Libphonenumber-6.2.jar)Click the ' + ' point in ' 2 ' and select ' 3 ' point to the ' Jars or directories ' option, then add the frameworks and external folders in turn. For example:Other versions of the code may appear when adding frameworks:No matter, just show the problem, click OK or the frameworks path will be added.If you have a code jump error, follow the steps above to add the path or jar file of the code to its Dependencies tab.Five, Debug so
Contactscommon used to Geocoder-2.9.jar and Libphonenumber-6.2.jar)Click the ' + ' point in ' 2 ' and select ' 3 ' point to the ' Jars or directories ' option, then add the frameworks and external folders in turn. For example:Other versions of the code may appear when adding frameworks:No matter, just show the problem, click OK or the frameworks path will be added.If you have a code jump error, follow the steps above to add the path or jar file of the code to its Dependencies tab.Five, Debug so
LibraryRight-click Properties, Open Module Settings F4, tap + sign, first item. Search Gson Library, after import, in the app below Lib inside is not. It's just a script to download the library remotely.Modify package information at compile timeThe real strength is the ability to modify definitions, package names, Versioncode Versionname,Settings for signature files signingconfigs{//The following two names can be customized releasekey{ storefile file (' MYKEY ')
Android studio multi-channel packaging, formal debugging package, build. gradle Parsing1. describes the build. gradle file. 1.1 root directory Android
1.1.1
DefaultConfig is the root directory of Android. You can configure the package name and other information. If AndroidMainfest. xml is also configured, use defaconfig config as the standard.
1.1.2
SigningConfig
Errors Based on the LOG on cygwin.
4. C code library not found in Java code
Error Description: AndroidRuntime (1171): java. lang. unsatisfiedLinkError: Couldn't load Hello1 from loader dalvik. system. pathClassLoader [DexPathList [[zip file "/data/app/com.example.ndk-1.apk"], nativeLibraryDirectories = [/data/app-lib/com. example. ndk-1,/system/lib]: findLibrary returned null
Solution: This indicates that the Java code library name is rough when loading the C code library. Correct the name in t
Android Android-build an android development environment, android-android
Android official website address: http://developer.android.com/, download and install AndroidSDK following the steps below:
Download ADT and SDK: http://dev
kinds of apk.
Tip: Gradle supports the use of camel-style abbreviations on the command line instead of task names, such as:
Gradle AR
Equal to
Gradle Assemblerelease
As long as there is no other task the abbreviation is also ' AR 'Check dependencies for tasks related to:
Check dependency Lint
Connectedcheck relies on connectedandroidtest and connecteduiautomatortest (not yet implemented)
Devicecheck relies on the tasks provided by Plug-ins that implem
the official website document below:It's easier to use Android studio to create an L Developer Preview project.In the initial creation interface:1. Select Phone and Tablet2. Select API 20+: Android L (Preview) in Minimum SDK.Once created, open the Build.gradle file and make sure that it looks like this:
Compilesdkversion is set to‘android-L‘
Minsdkversion
.
Public void testSave () throws Throwable {
FileService service = new FileService (this. getContext ());
Service. save ("456.txt"," sdfdgsdfasd ");
Log. I (TAG, "successful ");
}
// Unit test: The testRead () method is used to test whether our read (String filename) method is wrong.
Public void testRead () throws Throwable {
FileService service = new FileService (this. getContext ());
String result = service. read ("123.txt ");
Log. I (TAG, result );
}
}
④ List file AndroidManifest. xml
Packa
Android practices 11: Android Studio, Gradle, and androidgradle
After more than two months of AS experience, I think it is time to migrate the Android development environment to the. Currently, the latest version is 1.0.2. In addition to the occasional crash of the UI control drag and drop (Ubuntu), other functions are very smooth and efficient. What impressed m
I did some other work in the past two days because I used the arraylist class when I used the getproviders () method yesterday. I suddenly wanted to have a deep understanding of its mechanism, and I got a lot of results, I had a very tangled look at the Java Collection framework analyzed by a great god.Source codeIn this way, the Fail fast mechanism is naked and the coreCodeTake me into the design mode of the door, the original source code uses the decorator design mode, today I also summarized
define them, see the frameworks/base/core/res/values/arrays. xml file.4. \ AndroidManifest. xmlCode 4 is the AndroidManifest. xml file of the "helloWorld" project. This file is unique for each application.The AndroidManifest. xml file defines the activity, intent, uses-sdk, uses-permission, service, uses-library, Content provider, Broadcast explorer, and other information of the application.Code 4 AndroidManifest. xmlPackage = "com. miaozl. helloWorld" // package nameAndroid: versionCode = "1"
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.