Android Studio 使用gradle编译app遇到的问题及解决方法

  1. Android Studio gradle:build model长久运行不结束

gradle.properties,文件中添加内容

org.gradle.daemon=true

build.gradle(:root),可以看到mavenCentral()拖慢,注释mavenCentral(),另外需要镜像

maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/’ }

 

  1. Android Studio: Android Manifest doesn’t exists or has incorrect root tag

点击File / Sync project with Gradle files

 

  1. AndroidManifest.xml – specified for property ‘manifest’ does not exist

Remove this chunk of code from your build.gradle:root) in the root directory

apply plugin: ‘com.android.application’

and

android
{

compileSdkVersion 21

buildToolsVersion “20.0.0”

defaultConfig
{

applicationId “xxx.xxx.xxx”

minSdkVersion 15

targetSdkVersion 19

versionCode 1

versionName “0.5”

}

}

 

  1. How to add clean task – Task ‘clean’ not found

add below in the build.gradle(:root)

apply plugin:’base’

  1. Entry name ‘AndroidManifest.xml’ collided (Build failed after updating the android gradle plugin to 3.6.0)

add below in the build.gradle(:app)

android
{
packagingOptions
{
exclude
‘AndroidManifest.xml’

}

}

SEGGER编译Nordic nRF示例问题

环境: SEGGER Embedded Studio for ARM v7.10nRF5 SDK 17.1.0

使用SEGGER编译示例ble_app_uart,出现一下问题及相应的解决思路:

问题1: retarget.c:101:23: error: unknown type name ‘__printf_tag_ptr’

修改retarget.c:99

#if defined(__SES_VERSION) && (__SES_VERSION >= 34000)

#if defined(__SES_VERSION) && (__SES_VERSION >= 34000) && !defined(__SEGGER_RTL_VERSION)

 

问题2:  “.text is larger than specified size” and “.rodata is larger than specified size”

在项目目录下找到flash_placement.xml” 找到两行
<ProgramSection alignment=”4″ load=”Yes” name=”.text” sizeof=”0x4″/>    <ProgramSection alignment=”4″ load=”Yes” name=”.rodata” sizeof=”0x4″ />

将上面的sizeof=”0x4″ 删除

 

问题3: libc_v7em_fpv4_sp_d16_hard_t_le_eabi_balanced.a(fileops.o): in function `putchar’:”

修改”Library I/O” (under Project options >> Code >> Library) from “None” to “RTT”

Unity android 添加虚拟方向盘控制

首先加载CrossPlatformInput资产,将其中Prefabs下面的MobileSingleStickControl添加到游戏场景上。

然后将玩家脚本中的坐标轴获取方法

float x = Input.GetAxisRaw(“Horizontal”);

float y = Input.GetAxisRaw(“Vertical”);

修改如下:

float x = CrossPlatformInputManager.GetAxisRaw(“Horizontal”);

float y = CrossPlatformInputManager.GetAxisRaw(“Vertical”);

如何在google play控制台删除已上传的aab文件

https://stackoverflow.com/questions/45822460/remove-apk-from-library-in-google-play-developer-console 转载

Just go to App bundle explorer and remove the needed abb. You can do it with these steps:

  1. Open Google Play Console
  2. Go to your project
  3. Go to the “Release” section of the side-bar
  4. Go to the “App bundle explorer”
  5. Find the APK/Bundle and click “Delete APK/Bundle”.

Keep in mind that you need to detach the specific APK/Bundle from any draft releases and save it. Otherwise, the delete option will not be available.

2022年总结

2022年这一年真让人五味陈杂。从4月上海封城,到北京6月疫情爆发,到新疆封城大半年,再到民众上街反抗野蛮封锁。到最后无序开发,民众只能自救,这个政腐还有什么合法性。
这一年对自己来说挺困难的。一方面工作不好找,只能接些项目。另外还得提防这个变态清零政策对家人的影响。
今年在google play 发布了7款app和5款手游。虽然没挣到什么钱,但对我来说还是一个里程碑意义。
另外就是自家崽健健康康长到一周岁。

git 拉取子模块出错can not find github.com port 9418

git submodule update –init –recursive

出错信息:

can not find github.com port 9418

fatal: unable to connect to github.com:

github.com[0: 20.205.243.166]: errno=Connection timed out

fatal: clone of ‘git://github.com/mapsme/Alohalytics.git’ into submodule path ‘/root/omim/3party/Alohalytics’ failed

解决方法如下:

git config –global url.”https://github.com/”.insteadOf git://github.com/