android studio1.2.1.1中怎么找不到build目录(R文件在哪呢?)刚用as,先谢谢大家了!

图片说明

2个回答

点击Android后边的小三角,换一种模式就可以了,选择Project

u010021362
ptreesptrees 这个是正解,为什么有人踩。。
接近 2 年之前 回复

非常谢谢,解决了我的问题。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Android Studio 3.5.2 / 3.5.3 cocos2d-x 3.17.2 android编译问题
先上环境 Java:Java1.8.60 SDK:API -> android-28 Tools -> 26.1.1 NDK:android-ndk-r16b cocos官方说是以android-ndk-r16b测试的,所以我用了这个 ANT:1.10.7 Python:2.7.9 Android studio :3.5.3 cocos2d-x:cocos2d-x 3.17.2 好吧,就这些了,首先我用cocos new创建项目 用Android studio 3.5.3 打开项目,OK,测试成功!如图 <br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576218933_195606.png) <br><br> 能编译成功中途也遇到了各种坑,先不说这个,再说一说后续开发的问题 比如:<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219089_983324.png) <br><br> 上图就是我自己重新创建了一个MainScene的场景,在HelloWorldScene.cpp中引用这个类,并实例化,如图:<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219341_669768.png) <br><br> 在HelloWorldScene::init()中创建一个sc的MainScene指针 <br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219348_260859.png) <br><br> 以上代码在VS2015 编译通过,或者创建一个按钮点击事件中创建MainScene场景,并replaceScene函数替换当前场景,VS编译没有问题,但android studio提示MsinScene::createScene()未定义!!! <br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219705_649754.png) <br><br> 说到这里,肯定有人会说,你应该是Android.mk没有包含cpp文件吧?<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576219788_453715.png) <br><br> 到底是哪里出了错误,为什么要这样对我啊 我在MainScene文件中定义其他的类或者继承类却能通过,如下:<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576220195_583121.png)![图片说明](https://img-ask.csdn.net/upload/201912/13/1576220201_747295.png)![图片说明](https://img-ask.csdn.net/upload/201912/13/1576220208_452735.png) <br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576220308_238647.png) <br><br> 为什么会这样? 定义其他类都没有问题,Scene就搞不了事情了,救命~~啊 <br><br><br> 我自己搞定了,编译发现gradle.properties 中的编译模式是Cmake,并不是NDK-Build模式,如下:<br> PROP_BUILD_TYPE=cmake<br> 所以Android.mk文件包含ccp是没有用的,只能在项目根目录的CMakeLists.txt文件里包含cpp文件就可以了,如下图:<br><br> ![图片说明](https://img-ask.csdn.net/upload/201912/13/1576229813_129581.png) <br><br>纠结好久的问题终于解决了,希望能帮到别人<br> 我用的工具是:<br> android studio 3.5.3<br> cocos2d-x 3.17.2<br> NDK r16b<br> SDK API 28 <br> SDK build tools 26.1.1<br> apache ant 1.10.7 <br> python 2.7.9<br> java jdk1.8.0_91<br> Visual studio 2015 社区版<br>
Android studio打包的APK不能在Android5.1上安装
可以连接真机测试,但是打包出来的APK不能在真机上安装,请问会是哪方面的影响? Android studio 升级到最新版本,打包出来的APK不能在Android5.1上运行 下面是对应的gradle和build对应的内容 ``` apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "27.0.3" ``` ``` distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip ``` ``` buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } ``` ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.demo" android:versionCode="1" android:versionName="1.1"> <uses-sdk android:minSdkVersion="20" android:targetSdkVersion="25" /> ```
android studio 混淆文件配置
![据说android studio 默认将libs的第三方jar包忽略混淆,所以就没有将类似#-libraryjars libs/umeng-analytics-v5.2.4.jar的操作写入到配置文件,只是将-keep class com.umeng.**{*;}和忽略警告的操作写入配置文件。但是发现gradle在.idea/libraries中引入了其他很多jar包以及这些包的存储地址。刚好程序报错中的com.b.a.a.a 就是指的idea/libraries中的一个包中的类,即为com.loopj.android.http.AsyncHttpClient,不知道怎么在混淆配置文件中忽略这些包的混淆。最后通过配置,发现这些包还是被混淆了,不知道怎么才能配置好这些包不被混淆](https://img-ask.csdn.net/upload/201511/10/1447140316_8891.jpg) 下面是我的配置文件: -optimizationpasses 5 -dontusemixedcaseclassnames -verbose -dontpreverify -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keepattributes *Annotation* -keepattributes Signature -keep class android.**{*;} -keep public class * extends android.view -keep public class * extends android.app.Fragment -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep public class * extends android.support.V4.** -keep public class * extends android.vending.licensing.ILicensingService -dontwarn android.support.v4.** -keep class * extends android.support.v4.**{*;} -dontwarn android.support.v7.** -keep class * extends android.support.v7.**{*;} /* 将libs文件下的三方包忽略混淆*/ -keep class com.mob.logcolletor.**{ *;} -dontwarn com.mob.tools.** -keep class com.mob.tools.**{ *;} -dontwarn com.mob.baidu.** -keep class com.mob.baidu.**{ *;} -dontwarn cn.sharesdk.framework.** -keep class cn.sharesdk.framework.**{ *;} -dontwarn cn.sharesdk.system.email.** -keep class cn.sharesdk.system.email.**{ *;} -dontwarn cn.sharesdk.tencent.qq.** -keep class cn.sharesdk.tencent.qq.**{ *;} -dontwarn cn.sharesdk.system.text.** -keep class cn.sharesdk.system.text.**{ *;} -dontwarn cn.sharesdk.wechat.friends.** -keep class cn.sharesdk.wechat.friends.**{ *;} -dontwarn cn.sharesdk.wechat.utils.** -keep class cn.sharesdk.wechat.utils.**{ *;} -dontwarn cn.sharesdk.wechat.favorite.** -keep class cn.sharesdk.wechat.favorite.**{ *;} -dontwarn cn.sharesdk.wechat.moments.** -keep class cn.sharesdk.wechat.moments.**{ *;} -dontwarn com.tencent.** -keep class com.tencent..**{ *;} -keep public interface com.mob.logcolletor.** -keep public interface com.mob.tools.** -keep public interface com.mob.baidu.** -keep public interface cn.sharesdk.framework.** -keep public interface cn.sharesdk.system.email.** -keep public interface cn.sharesdk.tencent.qq.** -keep public interface cn.sharesdk.system.text.** -keep public interface cn.sharesdk.wechat.friends.** -keep public interface cn.sharesdk.wechat.utils.** -keep public interface cn.sharesdk.wechat.favorite.** -keep public interface cn.sharesdk.wechat.moments.** -keepclasseswithmembernames class * { native <methods>; } -keepclassmembers public class * extends android.view.View { void set*(***); *** get*(); } -keepclasseswithmembernames class * { void onClick*(...); } -keepclasseswithmembernames class * { *** *Callback(...); } -keepclasseswithmembernames class * { public <init>(android.content.Context,android.util.AttributeSet,int); } -keepclasseswithmembernames class * { public <init>(android.content.Context,android.util.AttributeSet); } -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -keep class org.apache.http.**{*;} -keepclassmembers class **.R$* { public static <fields>; } /* 将External Libraries文件下的三方包忽略混淆*/ -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.loopj.android/android-async-http/1.4.8/77bbfe240e437ecb396d982afa0d3bd4f9090ba7/android-async-http-1.4.8.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.loopj.android/android-async-http/1.4.8/ec314dce534e83c93364388d023625bb8e605e38/android-async-http-1.4.8-sources.jar! -libraryjars build/intermediates/exploded-aar/com.soundcloud.android/android-crop/1.0.0/jars/classes.jar -libraryjars build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.0/jars/classes.jar -libraryjars $USER_HOME$/Documents/androidWorkSpace/android-sdk-macosx/extras/android/m2repository/com/android/support/appcompat-v7/23.0.0/appcompat-v7-23.0.0-sources.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/7.0.1/d5d13ea991eab0252e3710e5df3d6a9d4b21d461/butterknife-7.0.1.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/7.0.1/ad53343e57ae0969aaf451a19eef381abe2ad3a1/butterknife-7.0.1-sources.jar -libraryjars build/intermediates/exploded-aar/com.android.support/cardview-v7/23.0.0/jars/classes.jar -libraryjars $USER_HOME$/Documents/androidWorkSpace/android-sdk-macosx/extras/android/m2repository/com/android/support/cardview-v7/23.0.0/cardview-v7-23.0.0-sources.jar -libraryjars build/intermediates/exploded-aar/com.android.support/design/23.0.0/jars/classes.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/glide/3.6.1/86b122e640af09b0723e1fa44083c354ba6d9089/glide-3.6.1.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/glide/3.6.1/c84c6f18844d9ae76308619008d40277de5e77d3/glide-3.6.1-sources.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.3/5fc52c41ef0239d1093a1eb7c3697036183677ce/gson-2.3.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.3/21e31b9298ed677b17fcac6dd0eb0a82ec35adc2/gson-2.3-sources.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.3.2/31fbbff1ddbf98f3aa7377c94d33b0447c646b6e/httpcore-4.3.2.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.3.2/4809f38359edeea9487f747e09aa58ec8d3a54c5/httpcore-4.3.2-sources.jar -libraryjars build/intermediates/exploded-aar/com.rengwuxian.materialedittext/library/2.1.4/jars/classes.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.nineoldandroids/library/2.4.0/e9b63380f3a242dbdbf103a2355ad7e43bad17cb/library-2.4.0.jar -libraryjars $USER_HOME$/.gradle/caches/modules-2/files-2.1/com.nineoldandroids/library/2.4.0/83d41901478fa8795254244acbafd03f14224dab/library-2.4.0-sources.jar -libraryjars build/intermediates/exploded-aar/com.orhanobut/logger/1.10/jars/classes.jar -libraryjars build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.0.0/jars/classes.jar -libraryjars $USER_HOME$/Documents/androidWorkSpace/android-sdk-macosx/extras/android/m2repository/com/android/support/recyclerview-v7/23.0.0/recyclerview-v7-23.0.0-sources.jar -libraryjars $USER_HOME$/Documents/androidWorkSpace/android-sdk-macosx/extras/android/m2repository/com/android/support/support-annotations/23.0.0/support-annotations-23.0.0.jar -libraryjars $USER_HOME$/Documents/androidWorkSpace/android-sdk-macosx/extras/android/m2repository/com/android/support/support-annotations/23.0.0/support-annotations-23.0.0-sources.jar -libraryjars build/intermediates/exploded-aar/com.android.support/support-v4/23.0.0/jars/classes.jar -libraryjars build/intermediates/exploded-aar/com.android.support/support-v4/23.0.0/jars/libs/internal_impl-23.0.0.jar -libraryjars $USER_HOME$/Documents/androidWorkSpace/android-sdk-macosx/extras/android/m2repository/com/android/support/support-v4/23.0.0/support-v4-23.0.0-sources.jar -dontwarn com.loopj.android.http.** -keep class com.loopj.android.http.**{ *;} -dontwarn com.baidu.** -keep class com.baidu.**{ *;} -dontwarn com.bumptech.glide.** -keep class com.bumptech.glide.**{ *;} -dontwarn com.google.gson.** -keep class com.google.gson.http.**{ *;} -dontwarn com.nineoldandroids.** -keep class com.nineoldandroids.**{ *;} -dontwarn com.orhanobut.logger.** -keep class com.orhanobut.logger.**{ *;} -dontwarn com.rengwuxian.materialedittext.** -keep class com.rengwuxian.materialedittext.**{ *;} -dontwarn com.soundcloud.android.crop.** -keep class com.soundcloud.android.crop.**{ *;} -ignorewarning -dump class_files.txt -printseeds seeds.txt -printusage unused.txt -printmapping mapping.txt
如何使用android studio将指定文件编译到apk中
我现在有一些文件需要编译到apk中,但是不知道如何操作 这个是我需要编译到apk中的文件: ![这个是我需要编译到apk中的文件](https://img-ask.csdn.net/upload/201708/29/1503990358_889265.png) 我希望最终达成的效果: ![我希望最终达成的效果](https://img-ask.csdn.net/upload/201708/29/1503990495_434378.png) 我所使用的android stduio的版本为2.3.3,gradle版本为2.2.3。 我的 build.gradle文件 ``` apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "lnsoft.mobile.xtyth" minSdkVersion 21 targetSdkVersion 25 versionCode 4 versionName "1.06" //testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" // multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } // sourceSets{ // main{ // jniLibs.srcDirs=['libs'] // } // } aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) testCompile 'junit:junit:4.12' compile 'com.android.support:cardview-v7:25.3.1' compile 'com.android.support:design:25.3.1' compile 'com.android.support:recyclerview-v7:25.3.1' compile 'com.android.support:appcompat-v7:25.3.1' compile 'org.litepal.android:core:1.6.0' compile 'com.alibaba:fastjson:1.1.62.android' compile project(path: ':commondialogutils_green') compile project(':Android_Validator_master') compile project(':pulltorefreshview') compile project(':changeskin') // compile 'com.android.support:multidex:1.0.1' } ``` 我该如何操作?
android studio编译运行APP不能上传模拟器或真机
编译完成后提示:“Failure [INSTALL_FAILED_OLDER_SDK]”,真机和模拟器都不行 试过网上方法1:在AndroidManifest.xml 中加 <uses-sdk android:minSdkVersion="13" />,仍然不行 方法2:修改/build/core/version_defaults.mk文件,但找不到这个文件 环境:Android studio 0.8,JDK 1.8
Android Studio 手动搭建LibGDX for Android环境
想用AS开发LibGdx,因为官方自带的Gdx-setup创建的工程实在太难导入,于是自己动手建一个工程。 工程目录如下:![图片说明](https://img-ask.csdn.net/upload/202002/27/1582782883_220472.png) 整个工程的build.gradle ``` // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.6.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } ``` Android的build.gradle ``` apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "29.0.3" defaultConfig { applicationId "com.end.of.sea" minSdkVersion 21 targetSdkVersion 29 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } dependencies { implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation files('libs/gdx-backend-android.jar') implementation project(path: ':gdx-game') } ``` gdx-game ``` apply plugin: 'java-library' dependencies { implementation files('libs/gdx.jar') implementation files('libs/gdx-backend-gwt.jar') implementation files('libs/gdx-backend-lwjgl.jar') implementation files('libs/gdx-backend-lwjgl-natives.jar') implementation files('libs/gdx-natives.jar') implementation files('libs/gdx-freetype.jar') implementation files('libs/gdx-freetype-natives.jar') } sourceCompatibility = "7" targetCompatibility = "7" ``` 如果将MainActivity继承AndroidApplication启动游戏的话,就会出现下面的错误。 ![图片说明](https://img-ask.csdn.net/upload/202002/27/1582783351_533406.png) 网上那些换字体和编码试过都没用。 ——————2020.3.1更新,问题已解决 我试着将MainActivity改成普通的Activity。编译时报错说找不到模块指定的jar包。 ![图片说明](https://img-ask.csdn.net/upload/202003/01/1583060953_817246.png) 于是我又新建了一个工程,这次把android相关的jar和so库放进app/libs里,并在build.gradle中添加了对jar和so库的引用。 ![图片说明](https://img-ask.csdn.net/upload/202003/01/1583062737_383705.png) 写一个游戏类。再次将MainActivity改成游戏入口。发现可以运行了。不过图片是网上随便找的。 ![图片说明](https://img-ask.csdn.net/upload/202003/01/1583062791_267407.png) 第一次写文章,格式也不太会弄,可能表达的有点混乱。见谅。
Android Studio导入第三方库AndroidSwipeLayout 运行时报错
本人刚开始学习android,小白水平。在导入第三方库AndroidSwipeLayout的时候遇到错误:每次运行的时候都会报错Error: Program type already present: android.support.v4.os.ResultReceiver。 因为刚开始学习,对gradle还不是很了解,到网上查询之后说是可能我有两个包版本不同但同时导入才导致的,但是我实在找不到报错中的信息对应在构建文件中的什么部分,在网上找了几个办法也都没有管用,求大神指点! 导入时用的是import Module,然后在project structure里添加依赖。 本人对gradle正在努力学习,还不是很懂,,附上配置文件的部分: **项目的build.gradle** ``` buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.0-beta04' } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } ``` ## **app的build.gradle** ``` apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.zhang.hp.myapplication" minSdkVersion 15 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.0.0-alpha1' implementation 'androidx.constraintlayout:constraintlayout:1.1.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.0-alpha3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3' implementation project(':library') } ``` ## 导入的library的build.gradle ``` apply plugin: 'com.android.library' android { compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION defaultConfig { minSdkVersion 9 targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION) } } dependencies { compile 'com.android.support:recyclerview-v7:25.2.0' compile 'com.android.support:support-v4:25.2.0' } // build a jar with source files task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } artifacts { archives sourcesJar } ``` ## **gradle.properties** ``` # Project-wide Gradle settings. # IDE (e.g. Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true ANDROID_BUILD_TARGET_SDK_VERSION=25 ANDROID_BUILD_TOOLS_VERSION=25.0.0 ANDROID_BUILD_SDK_VERSION=25 ANDROID_BUILD_MIN_SDK_VERSION=14 ``` 最好能说明一下导包的版本问题,希望大神们能指点一下,谢谢!
android studio 导入报错
开始可以运行 然后我拷贝到另外一台电脑上就无法运行 先是报错 Installation failed with message Invalid File: K:\project\app\build\intermediates\split-apk\with_ImageProcessor\debug\slices\slice_0.apk. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing. WARNING: Uninstalling will remove the application data! Do you want to uninstall the existing application? 然后我按照stackoverflow上的方法 Click Build tab ---> Clean Project Click Build tab ---> Build APK Run. 走了一遍 但是程序打不开 点击debug 然后 debug界面显示 $ adb install-multiple -r /Users/user/Desktop/x1/Xd/app/build/outputs/apk/app-debug.apk Split APKs installed $ adb shell am start -n "com.example.user.xd/com.example.user.xd.FirstActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Connecting to com.example.user.xd Connected to the target VM, address: 'localhost:8600', transport: 'socket' Disconnected from the target VM, address: 'localhost:8600', transport: 'socket' Android Monitor 提示 09-21 21:59:40.061 22694-22694/? I/art: Late-enabling -Xcheck:jni 09-21 21:59:40.114 22694-22694/com.example.user.xd W/ActivityThread: Application com.example.user.xd is waiting for the debugger on port 8100... 09-21 21:59:40.114 22694-22694/com.example.user.xd I/System.out: Sending WAIT chunk 09-21 21:59:40.315 22694-22700/com.example.user.xd I/art: Debugger is active 09-21 21:59:40.515 22694-22694/com.example.user.xd I/System.out: Debugger has connected 09-21 21:59:40.515 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:40.715 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:40.915 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.115 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.316 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.516 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.716 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.917 22694-22694/com.example.user.xd I/System.out: debugger has settled (1396) 09-21 21:59:42.009 22694-22694/com.example.user.xd W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --non-interactive --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.example.user.xd-2/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.example.user.xd-2@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status 09-21 21:59:42.020 22694-22694/com.example.user.xd W/art: Fallback to original dex file with interpret-mode for /data/app/com.example.user.xd-2/split_lib_slice_0_apk.apk 09-21 21:59:42.021 22694-22694/com.example.user.xd W/System: ClassLoader referenced unknown path: /data/app/com.example.user.xd-2/lib/arm 09-21 21:59:42.025 22694-22694/com.example.user.xd I/InstantRun: starting instant run server: is main process 09-21 21:59:42.031 22694-22694/com.example.user.xd I/art: Rejecting re-init on previously-failed class java.lang.Class<com.example.user.xd.FirstActivity> 09-21 21:59:42.031 22694-22694/com.example.user.xd D/AndroidRuntime: Shutting down VM 09-21 21:59:42.035 22694-22694/com.example.user.xd E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.user.xd, PID: 22694 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.user.xd/com.example.user.xd.FirstActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.user.xd.FirstActivity" on path: DexPathList[[zip file "/data/app/com.example.user.xd-2/base.apk", zip file "/data/app/com.example.user.xd-2/split_lib_slice_0_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.user.xd-2/lib/arm, /vendor/lib, /system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2360) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509) at android.app.ActivityThread.access$1000(ActivityThread.java:153) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:5528) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.user.xd.FirstActivity" on path: DexPathList[[zip file "/data/app/com.example.user.xd-2/base.apk", zip file "/data/app/com.example.user.xd-2/split_lib_slice_0_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.user.xd-2/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at android.app.Instrumentation.newActivity(Instrumentation.java:1068) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2350) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)  at android.app.ActivityThread.access$1000(ActivityThread.java:153)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:5528)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)  Suppressed: java.lang.NoClassDefFoundError: com.example.user.xd.FirstActivity at dalvik.system.DexFile.defineClassNative(Native Method) at dalvik.system.DexFile.defineClass(DexFile.java:226) at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219) at dalvik.system.DexPathList.findClass(DexPathList.java:338) at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54) ... 13 more Suppressed: java.lang.ClassNotFoundException: com.example.user.xd.FirstActivity at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 12 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
Android Studio编译不通过,怀疑是v4依赖包重复的问题。
我已经把app包和其他Module包下的v4版本都改成23.3.0了,然而在工程的依赖库下还是能看到23.4.0这个版本的v4包。想删除又找不到在哪儿删除,按网上说的加了force=true了还是不行,编译的时候就一直出现 <Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_74\bin\java.exe'' finished with non-zero exit value 2>。
Android studio 编译的时候gc overhead limit exceeded
A larger heap for the Gradle daemon is recommended for running jack. It currently has 1024 MB. For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB. To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties. 可是在项目的gradle.properties文件中我已经修改了 # Default value: -Xmx10248m -XX:MaxPermSize=512m # org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 在app的build.gradle文件中按网上的加入了 dexOptions { preDexLibraries true javaMaxHeapSize "3g" incremental true dexInProcess = true } 为什么起不到作用 Android studio版本2.2 Gradle版本gradle-2.14.1-all.zip
android studio 上传library到jcenter出现的问题
各路大神,有没有知道在配置上传到jcenter库的时候出现: ![问题描述](https://img-ask.csdn.net/upload/201703/19/1489926235_822431.jpg) # 这种错误是应该怎么办把。 网上搜了很久很久,一直找不到解释。。。最具有参考价值的可能就是这个了。 <http://stackoverflow.com/questions/25172006/android-studio-build-fails-with-task-not-found-in-root-project-myproject> 我的项目配置文件如下: ``` // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.0' // classpath 'com.novoda:bintray-release:0.3.4' // // NOTE: Do not place your application dependencies here; they belong // // in the individual module build.gradle files classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } ``` 对了 这是可能有作用的日志文件。
android: 遇到了一个eclipse工程转到studio上的问题?求大神帮解决
我在把项目由eclipse导到studio的时候遇到了一个问题,如下: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Java\jdk1.8.0_65\bin\java.exe'' finished with non-zero exit value 2 在eclipse上项目是能够正常运行的,但是移植到studio上之后,出现了这个错误. 在使用eclipse的时候我使用的jdk是32位 1.7的 而studio的jdk是64位,1.8的,不知道是不是这个原因,请大神,帮我看一看!!!谢谢
android studio 导入项目报错
刚学习使用studio,导入项目的时候报gradle DSL method not found:"android( )";按照网上说的把build.gradle 里面的android{}给注释掉重新编译,又报:failed to find Build Tools revision 23.0.0 rc2,下面还给出了安装23.0.0 rc2 的连接,点击它又无法安装,直接到sdk manager 下找也找不到这个版本,我到Project Structure里面把 ”Build Tool Version“改为23.0.1重新编译,Build.gradle文件又自动生成了个Android{},又报一开始的那个错,有 没有人遇到类似的问题,求帮忙解答下
使用Xamarin.Android,调用摄像头拍照到指定位置,没有生成图片,不指定位置却可以,求解惑
使用Xamarin.Android拍照,想把拍照的图片保存到程序目录下,代码如下 ``` private void TakeAPicture(object sender, EventArgs eventArgs) { var intent = new Intent(MediaStore.ActionImageCapture); File finalFile = new File( this.GetExternalFilesDir(Android.OS.Environment.DirectoryPictures), "1.jpg"); if (!finalFile.ParentFile.Exists()) { finalFile.ParentFile.Exists(); } if (Build.VERSION.SdkInt >= BuildVersionCodes.N) { photoURI = FileProvider.GetUriForFile( this, "com.mydomain.fileprovider", finalFile); intent.PutExtra(MediaStore.ExtraOutput, photoURI); } else { intent.PutExtra(MediaStore.ExtraOutput, Android.Net.Uri.FromFile(finalFile)); } StartActivityForResult(intent, Display_RequestCode); } ``` 摄像头启动成功,可拍照,在OnActivityResult中获取了resultCode为Result.OK,但是在指定位置文件夹创建了但没有生成文件(路径是fileprovider生成的content://)。 但是修改代码,不指定图片位置 ``` private void TakeAPicture(object sender, EventArgs eventArgs) { var intent = new Intent(MediaStore.ActionImageCapture); StartActivityForResult(intent, Display_RequestCode); } ``` 然后在OnActivityResult中,通过 ``` Bitmap bm = (Bitmap)data.Extras.Get("data"); System.IO.FileStream fos = new System.IO.FileStream( string.Format("{0}/{1}.{2}",this.GetExternalFilesDir(Android.OS.Environment.DirectoryPictures),"1","jpg"), System.IO.FileMode.CreateNew); ``` 来另存图片,反而是成功了,请各位指定迷津啊。 测试机用的华为P10,android版本为8.1。
安卓官网databinding跑步了,程序包databinding找不到
E:\Android_Studio\workplace\BindingTest\app\src\main\java\com\example\bindingtest\MainActivity.java Error:(7, 54) 错误: 程序包com.example.bindingtest.databinding不存在 错误: cannot generate view binders com.sun.tools.javac.code.Symbol$CompletionFailure: 找不到android.view.View$InvalidateInfo的类文件 这个用的是官网上的例子,配置就只有build.gradle那里 dataBinding { enabled = true }。跑其他人的代码也是报这样的错误。AS版本2.1.1 , Android Support Repository是最新的
写Android BLE程序测试发现无法发现设备,请问怎么解决?
代码如下: 1.MainActivity部分 ``` public class MainActivity extends AppCompatActivity implements View.OnClickListener { private BluetoothAdapter mBluetoothAdapter; private RecyclerView mRecyclerView; private ScanResultAdapter mScanResultAdapter; private BluetoothLeScanner mBluetoothLeScanner; private Button mStartScaleButton,mStopScaleButton; private static final int REQUEST_CODE_ACCESS_COARSE_LOCATION = 1; //动态申请权限 private static final int SCAN_START = 1000; //开始搜索 private static final int SCAN_TIME = 10 * 1000; //扫描时间 private static final String TAG = "BLE"; private List<ScanResult> mList = new ArrayList<>(); private List<String> mListAddress = new ArrayList<>(); private Handler mHandler = new Handler(new Handler.Callback() { @Override public boolean handleMessage(@NonNull Message msg) { switch (msg.what){ case SCAN_START: scanBluetooth(false); } return false; } }); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initView(); SetOnClickListener(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {//如果 API level 是大于等于 23(Android 6.0) 时 //判断是否具有权限 if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { //判断是否需要向用户解释为什么需要申请该权限 if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION)) { Toast.makeText(MainActivity.this, "自Android 6.0开始需要打开位置权限才可以搜索到Ble设备", Toast.LENGTH_LONG).show(); } //请求权限 ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, REQUEST_CODE_ACCESS_COARSE_LOCATION); } } } private void initView(){ /*找到控件*/ mStartScaleButton = findViewById(R.id.bt_1); mStopScaleButton = findViewById(R.id.bt_2); mRecyclerView = findViewById(R.id.rv_1); mRecyclerView.addItemDecoration(new DividerItemDecoration(this,DividerItemDecoration.VERTICAL)); mRecyclerView.setLayoutManager(new LinearLayoutManager(this)); mScanResultAdapter = new ScanResultAdapter(this,mList); mRecyclerView.setAdapter(mScanResultAdapter); mScanResultAdapter.setOnItemClickListener(new ScanResultAdapter.OnItemClickListener() { @Override public void OnClick(int position) { scanBluetooth(false); ScanResult scanResult = mList.get(position); } }); /*获取本地蓝牙适配器*/ BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); mBluetoothAdapter = bluetoothManager.getAdapter(); mBluetoothLeScanner = mBluetoothAdapter.getBluetoothLeScanner(); if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { Toast.makeText(this, "设备不支持BLE", Toast.LENGTH_SHORT).show(); finish(); } /*打开蓝牙*/ if(mBluetoothAdapter == null ||!mBluetoothAdapter.isEnabled()){ Intent TrunOnBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(TrunOnBtIntent,0); } } /*控件点击事件*/ private void SetOnClickListener(){ mStartScaleButton.setOnClickListener(this); mStopScaleButton.setOnClickListener(this); } /*对应控件执行相关操作*/ @Override public void onClick(View v){ switch (v.getId()){ case R.id.bt_1: scanBluetooth(true); Toast.makeText(MainActivity.this,"扫描",Toast.LENGTH_LONG).show(); break; case R.id.bt_2: scanBluetooth(false); break; } } /*开始搜索设备及停止搜索设备函数*/ private void scanBluetooth(boolean isSan){ if(isSan==true){ mBluetoothLeScanner.startScan(mScanCallback); mHandler.sendEmptyMessageDelayed(SCAN_START,SCAN_TIME);//定时搜索蓝牙设备 }else { mBluetoothLeScanner.stopScan(mScanCallback); if(mHandler.hasMessages(SCAN_START)){ mHandler.removeMessages(SCAN_START); } } } /*搜索的回调函数*/ private ScanCallback mScanCallback = new ScanCallback() { @Override public void onScanResult(int callbackType, ScanResult result) { Log.i(TAG,"result:" + result + "callbackType:" + callbackType); /*通过扫描到的设备地址与新扫描的地址作比较,避免重复*/ if(!mListAddress.contains(result.getDevice().getAddress())){ mList.add(result); mListAddress.add(result.getDevice().getAddress()); } super.onScanResult(callbackType, result); } @Override /*扫描失败的处理*/ public void onScanFailed(int errorCode){ Log.e(TAG,"onScanFailed:" + errorCode); } }; } ``` 2.ScanResultAdapter部分 ``` public class ScanResultAdapter extends RecyclerView.Adapter<ScanResultAdapter.ViewHolder> { private Context mContext; private List<ScanResult> mList; private LayoutInflater inflater; private OnItemClickListener onItemClickListener; public ScanResultAdapter(Context mContext,List<ScanResult>mList){ this.mContext = mContext; this.mList = mList; inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } public void setOnItemClickListener(OnItemClickListener onItemClickListener){ this.onItemClickListener = onItemClickListener; } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { return new ViewHolder(inflater.from(mContext).inflate(R.layout.layout_scanadapter_item,parent,false)); } @Override public void onBindViewHolder(@NonNull ViewHolder holder, final int position) { ScanResult scanResult = mList.get(position); holder.tv_name.setText("设备名:"+scanResult.getDevice().getName()); holder.tv_address.setText("设备地址:"+scanResult.getDevice().getAddress()); holder.tv_rssi.setText("信号:"+scanResult.getRssi()); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(null != onItemClickListener){ onItemClickListener.OnClick(position); } } }); } @Override public int getItemCount() { return mList.size(); } public class ViewHolder extends RecyclerView.ViewHolder{ private TextView tv_name; private TextView tv_address; private TextView tv_rssi; public ViewHolder(@NonNull View itemView) { super(itemView); tv_name = itemView.findViewById(R.id.tv_name); tv_address = itemView.findViewById(R.id.tv_address); tv_rssi = itemView.findViewById(R.id.tv_rssi); } } public interface OnItemClickListener{ void OnClick(int position); } } ``` 另:测试手机为小米mix2s,SDK版本为29
在写一个AndroidBLE程序时,遇到了搜索不到设备的原因,怎么解决?
代码如下: 1.MainActivity部分 ``` public class MainActivity extends AppCompatActivity implements View.OnClickListener { private BluetoothAdapter mBluetoothAdapter; private RecyclerView mRecyclerView; private ScanResultAdapter mScanResultAdapter; private BluetoothLeScanner mBluetoothLeScanner; private Button mStartScaleButton,mStopScaleButton; private static final int REQUEST_CODE_ACCESS_COARSE_LOCATION = 1; //动态申请权限 private static final int SCAN_START = 1000; //开始搜索 private static final int SCAN_TIME = 10 * 1000; //扫描时间 private static final String TAG = "BLE"; private List<ScanResult> mList = new ArrayList<>(); private List<String> mListAddress = new ArrayList<>(); private Handler mHandler = new Handler(new Handler.Callback() { @Override public boolean handleMessage(@NonNull Message msg) { switch (msg.what){ case SCAN_START: scanBluetooth(false); } return false; } }); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initView(); SetOnClickListener(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {//如果 API level 是大于等于 23(Android 6.0) 时 //判断是否具有权限 if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { //判断是否需要向用户解释为什么需要申请该权限 if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION)) { Toast.makeText(MainActivity.this, "自Android 6.0开始需要打开位置权限才可以搜索到Ble设备", Toast.LENGTH_LONG).show(); } //请求权限 ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, REQUEST_CODE_ACCESS_COARSE_LOCATION); } } } private void initView(){ /*找到控件*/ mStartScaleButton = findViewById(R.id.bt_1); mStopScaleButton = findViewById(R.id.bt_2); mRecyclerView = findViewById(R.id.rv_1); mRecyclerView.addItemDecoration(new DividerItemDecoration(this,DividerItemDecoration.VERTICAL)); mRecyclerView.setLayoutManager(new LinearLayoutManager(this)); mScanResultAdapter = new ScanResultAdapter(this,mList); mRecyclerView.setAdapter(mScanResultAdapter); mScanResultAdapter.setOnItemClickListener(new ScanResultAdapter.OnItemClickListener() { @Override public void OnClick(int position) { scanBluetooth(false); ScanResult scanResult = mList.get(position); } }); /*获取本地蓝牙适配器*/ BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); mBluetoothAdapter = bluetoothManager.getAdapter(); mBluetoothLeScanner = mBluetoothAdapter.getBluetoothLeScanner(); if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { Toast.makeText(this, "设备不支持BLE", Toast.LENGTH_SHORT).show(); finish(); } /*打开蓝牙*/ if(mBluetoothAdapter == null ||!mBluetoothAdapter.isEnabled()){ Intent TrunOnBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(TrunOnBtIntent,0); } } /*控件点击事件*/ private void SetOnClickListener(){ mStartScaleButton.setOnClickListener(this); mStopScaleButton.setOnClickListener(this); } /*对应控件执行相关操作*/ @Override public void onClick(View v){ switch (v.getId()){ case R.id.bt_1: scanBluetooth(true); Toast.makeText(MainActivity.this,"扫描",Toast.LENGTH_LONG).show(); break; case R.id.bt_2: scanBluetooth(false); break; } } /*开始搜索设备及停止搜索设备函数*/ private void scanBluetooth(boolean isSan){ if(isSan==true){ mBluetoothLeScanner.startScan(mScanCallback); mHandler.sendEmptyMessageDelayed(SCAN_START,SCAN_TIME);//定时搜索蓝牙设备 }else { mBluetoothLeScanner.stopScan(mScanCallback); if(mHandler.hasMessages(SCAN_START)){ mHandler.removeMessages(SCAN_START); } } } /*搜索的回调函数*/ private ScanCallback mScanCallback = new ScanCallback() { @Override public void onScanResult(int callbackType, ScanResult result) { Log.i(TAG,"result:" + result + "callbackType:" + callbackType); /*通过扫描到的设备地址与新扫描的地址作比较,避免重复*/ if(!mListAddress.contains(result.getDevice().getAddress())){ mList.add(result); mListAddress.add(result.getDevice().getAddress()); } super.onScanResult(callbackType, result); } @Override /*扫描失败的处理*/ public void onScanFailed(int errorCode){ Log.e(TAG,"onScanFailed:" + errorCode); } }; } ``` 2. ScanResultAdapter部分 ``` public class ScanResultAdapter extends RecyclerView.Adapter<ScanResultAdapter.ViewHolder> { private Context mContext; private List<ScanResult> mList; private LayoutInflater inflater; private OnItemClickListener onItemClickListener; public ScanResultAdapter(Context mContext,List<ScanResult>mList){ this.mContext = mContext; this.mList = mList; inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } public void setOnItemClickListener(OnItemClickListener onItemClickListener){ this.onItemClickListener = onItemClickListener; } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { return new ViewHolder(inflater.from(mContext).inflate(R.layout.layout_scanadapter_item,parent,false)); } @Override public void onBindViewHolder(@NonNull ViewHolder holder, final int position) { ScanResult scanResult = mList.get(position); holder.tv_name.setText("设备名:"+scanResult.getDevice().getName()); holder.tv_address.setText("设备地址:"+scanResult.getDevice().getAddress()); holder.tv_rssi.setText("信号:"+scanResult.getRssi()); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(null != onItemClickListener){ onItemClickListener.OnClick(position); } } }); } @Override public int getItemCount() { return mList.size(); } public class ViewHolder extends RecyclerView.ViewHolder{ private TextView tv_name; private TextView tv_address; private TextView tv_rssi; public ViewHolder(@NonNull View itemView) { super(itemView); tv_name = itemView.findViewById(R.id.tv_name); tv_address = itemView.findViewById(R.id.tv_address); tv_rssi = itemView.findViewById(R.id.tv_rssi); } } public interface OnItemClickListener{ void OnClick(int position); } } ```
正在学习android的第一行代码的coolweather遇到了点问题
ChooseAreaFragment代码 import android.app.ProgressDialog; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import androidx.appcompat.widget.ButtonBarLayout; import androidx.fragment.app.Fragment; import com.example.coolweather.db.City; import com.example.coolweather.db.County; import com.example.coolweather.db.Province; import com.example.coolweather.util.HttpUtil; import com.example.coolweather.util.Utility; import org.litepal.crud.DataSupport; import java.io.IOException; import java.util.ArrayList; import java.util.List; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Response; public class ChooseAreaFrament extends Fragment { public static final int LEVEL_PROVINCE = 0; public static final int LEVEL_CITY=1; public static final int LEVEL_COUNTY = 2; private ProgressDialog progressDialog; private TextView titleText; private Button backButton; private ListView listView; private ArrayAdapter<String> adapter; private List<String> dataList = new ArrayList<>(); /** * 省列表 */ private List<Province> provinceList; /** * 市列表 */ private List<City> cityList; /** * 县列表 */ private List<County>countyList; /** * 选中的省份 */ private Province selectedProvince; /** * 选中的城市 */ private City selectedCity; /** * 当前选中的级别 */ private int currentLevel; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.choose_area,container,false); titleText = (TextView) view.findViewById(R.id.title_text); backButton = (Button) view.findViewById(R.id.back_button); listView = (ListView)view.findViewById(R.id.list_view); adapter = new ArrayAdapter<>(getContext(),android.R.layout.simple_list_item_1,dataList); listView.setAdapter(adapter); return view; } @Override public void onActivityCreated(Bundle savedInstanceState){ super.onActivityCreated(savedInstanceState); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { if(currentLevel == LEVEL_PROVINCE){ selectedProvince = provinceList.get(position); queryCities(); } else if (currentLevel == LEVEL_CITY) { selectedCity = cityList.get(position); queryCounties(); } } }); backButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (currentLevel == LEVEL_COUNTY) { queryCities(); } else if (currentLevel == LEVEL_CITY){ queryProvinces(); } } }); queryProvinces(); } /** * 查询全国所有的省,优先数据库查询,如果没有查询到再去服务器上查询 */ private void queryProvinces(){ titleText.setText("中国"); backButton.setVisibility(View.GONE); provinceList = DataSupport.findAll(Province.class); if (provinceList.size() > 0){ dataList.clear(); for (Province province : provinceList){ dataList.add(province.getProvinceName()); } adapter.notifyDataSetChanged(); listView.setSelection(0); currentLevel = LEVEL_PROVINCE; } else { String address = "http://guolin.tech/api/china"; queryFromServer(address,"province"); } } /** * 查询全国所有的城市,优先数据库查询,如果没有查询到再去服务器上查询 */ private void queryCities(){ titleText.setText(selectedProvince.getProvinceName()); backButton.setVisibility(View.VISIBLE); cityList = DataSupport.where("provinceid = ?",String.valueOf(selectedProvince. getId())).find(City.class); if(cityList.size() > 0){ dataList.clear(); for(City city : cityList){ dataList.add(city.getCityName()); } adapter.notifyDataSetChanged(); listView.setSelection(0); currentLevel = LEVEL_CITY; }else{ int provinceCode = selectedProvince.getProvinceCode(); String address = "http://guolin.tech/api/china/" + provinceCode; queryFromServer(address,"city"); } } /** * 查询全国所有的县,优先数据库查询,如果没有查询到再去服务器上查询 */ private void queryCounties(){ titleText.setText(selectedCity.getCityName()); backButton.setVisibility(View.VISIBLE); countyList = DataSupport.where("cityid = ?",String.valueOf(selectedCity. getId())).find(County.class); if(countyList.size() > 0 ){ dataList.clear(); for(County county : countyList){ dataList.add(county.getCountyName()); } adapter.notifyDataSetChanged(); listView.setSelection(0); currentLevel = LEVEL_COUNTY; }else{ int provinceCode = selectedProvince.getProvinceCode(); int cityCode = selectedCity.getCityCode(); String address = "http://guolin.tech/api/china/" + provinceCode + "/" + cityCode; queryFromServer(address,"county"); } } /** * 根据传入的地址和类型从服务器上查询省市县数据 */ private void queryFromServer(String address,final String type){ showProgressDialog(); HttpUtil.sendOkHttpRequest(address, new Callback() { @Override public void onResponse(Call call, Response response) throws IOException { String responseText = response.body().string(); boolean result = false; if("province".equals(type)){ result = Utility.handleProvinceResponse(responseText); } else if ("city".equals(type)){ result = Utility.handleCityResponse(responseText,selectedProvince.getId()); } else if ("county".equals(type)){ result = Utility.handleCountyResponse(responseText,selectedCity.getId()); } if (result){ getActivity().runOnUiThread(new Runnable() { @Override public void run() { closeProgressDialog(); if ("province".equals(type)){ queryProvinces(); } else if ("city".equals(type)){ queryCities(); } else if ("county".equals(type)) queryCounties(); } }); } } @Override public void onFailure(Call call, IOException e) { //通过runOnUiTread()方法回到主线程处理逻辑 getActivity().runOnUiThread(new Runnable() { @Override public void run() { closeProgressDialog(); Toast.makeText(getContext(),"加载失败",Toast.LENGTH_SHORT).show(); } }); } }); } /** * 显示进度对话框 */ private void showProgressDialog(){ if (progressDialog == null){ progressDialog = new ProgressDialog(getActivity()); progressDialog.setMessage("正在加载..."); progressDialog.setCanceledOnTouchOutside(false); } progressDialog.show(); } /** * 关闭进度对话框 */ private void closeProgressDialog(){ if (progressDialog != null){ progressDialog.dismiss(); } } Utility代码 import android.text.TextUtils; import com.example.coolweather.db.City; import com.example.coolweather.db.County; import com.example.coolweather.db.Province; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; public class Utility { /** * 解析和处理服务器返回的省级数据 */ public static boolean handleProvinceResponse(String response){ if (!TextUtils.isEmpty(response)){ try { JSONArray allProvinces = new JSONArray(response); for (int i = 0;i<allProvinces.length();i++){ JSONObject provinceObject = allProvinces.getJSONObject(i); Province province = new Province(); province.setProvinceName(provinceObject.getString("name")); province.setProvinceCode(provinceObject.getInt("id")); province.save(); } return true; } catch (JSONException e) { e.printStackTrace(); } } return false; } /** * 解析服务器和处理器返回的市级数据 */ public static boolean handleCityResponse(String response,int provinceId){ if(!TextUtils.isEmpty(response)){ try { JSONArray allCities = new JSONArray(response); for(int i=0;i<allCities.length();i++){ JSONObject cityObject = allCities.getJSONObject(i); City city = new City(); city.setCityName(cityObject.getString("name")); city.setCityCode(cityObject.getInt("id")); city.setProvinceId(provinceId); city.save(); } return true; } catch (JSONException e) { e.printStackTrace(); } } return false; } public static boolean handleCountyResponse(String response, int cityId){ if(TextUtils.isEmpty(response)){ try { JSONArray allCounties = new JSONArray(response); for(int i=0;i<allCounties.length();i++){ JSONObject countyObject = allCounties.getJSONObject(i); County county = new County(); county.setCountyName(countyObject.getString("name")); county.setWeatherId(countyObject.getString("weather_id")); county.setCityId(cityId); county.save(); } return true; } catch (JSONException e) { e.printStackTrace(); } } return false; } 复制代码 } HttpUtil代码 import okhttp3.OkHttpClient; import okhttp3.Request; public class HttpUtil { public static void sendOkHttpRequest(String address,okhttp3.Callback callback) { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder().url(address).build(); client.newCall(request).enqueue(callback); } 复制代码 } app apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "com.example.coolweather" minSdkVersion 15 targetSdkVersion 29 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } sourceSets { main { jniLibs.srcDirs = ['libs'] } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'org.litepal.android:core:1.4.1' implementation 'com.squareup.okhttp3:okhttp:3.4.1' implementation 'com.google.code.gson:gson:2.7' implementation 'com.github.bumptech.glide:glide:3.7.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } debug到这里就动不了![图片说明](https://img-ask.csdn.net/upload/201908/14/1565753464_912183.png)
opencv 在as ndk中 始终抱找不到 undefined reference to 'cv::imwrite
就这几行简单的代码编译都不通过 ``` #include"opencv2/opencv.hpp" using namespace cv; int sss() { Mat image= imread( "1", CV_LOAD_IMAGE_COLOR); imwrite("2.bmp",image); return 1; } ``` CMakeLists 文件 ``` cmake_minimum_required(VERSION 3.4.1) add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) set(CMAKE_VERBOSE_MAKEFILE on) set(ocvlibs "C:\\BC\\OpenCV\\sdk\\native\\libs") # 设置include文件夹的地址 include_directories(C:/BC/lua-5.2.0/src) include_directories(C:\\BC\\OpenCV\\sdk\\native\\jni\\include) add_library(native-lib SHARED native-lib.cpp) # 设置opencv的动态库 add_library(libopencv_java SHARED IMPORTED ) set_target_properties(libopencv_java PROPERTIES IMPORTED_LOCATION "${ocvlibs}/${ANDROID_ABI}/libopencv_java3.so") find_library(log-lib log) target_link_libraries(native-lib android log libopencv_java ${log-lib} ) ``` build.gradle ``` apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.example.opencvtest" minSdkVersion 22 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { cppFlags "-std=c++11", "-frtti", "-fexceptions" abiFilters 'x86' } } } sourceSets{ main{ jniLibs.srcDirs = ['C:\\BC\\OpenCV\\sdk\\native\\libs'] } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } externalNativeBuild { cmake { path "src/main/cpp/CMakeLists.txt" version "3.10.2" } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' } ``` ![图片说明](https://img-ask.csdn.net/upload/201906/03/1559539210_344978.png)
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
Java 14 都快来了,为什么还有这么多人固守Java 8?
从Java 9开始,Java版本的发布就让人眼花缭乱了。每隔6个月,都会冒出一个新版本出来,Java 10 , Java 11, Java 12, Java 13, 到2020年3月份,...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
讲真,这两个IDE插件,可以让你写出质量杠杠的代码
周末躺在床上看《拯救大兵瑞恩》 周末在闲逛的时候,发现了两个优秀的 IDE 插件,据说可以提高代码的质量,我就安装了一下,试了试以后发现,确实很不错,就推荐给大家。 01、Alibaba Java 代码规范插件 《阿里巴巴 Java 开发手册》,相信大家都不会感到陌生,其 IDEA 插件的下载次数据说达到了 80 万次,我今天又贡献了一次。嘿嘿。 该项目的插件地址: https://github....
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
Idea 中最常用的10款插件(提高开发效率),一定要学会使用!
学习使用一些插件,可以提高开发效率。对于我们开发人员很有帮助。这篇博客介绍了开发中使用的插件。
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
立即提问