eclipse项目转到Android studio的步骤和问题
来源:互联网 发布:pc蛋蛋外围算账软件 编辑:程序博客网 时间:2024/04/28 16:55
问题一:版本问题:项目中的版本和IDE的版本不一样
解决方案:
File->Project Structure->app->Properties
修改sdk版本和build tools版本,为编译器现有的版本
问题一、解决Could not find method android() for arguments问题
在导入新项目的时候,发现一直有个bug存在,编译出现如下错误:
Error:(23, 0) Could not find method android() for arguments [****] on root project '****' of type org.gradle.api.Project.
最终解决方案:打开项目gradle目录如下:
// 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.2.2' 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 }}allprojects { repositories { jcenter() }}task clean(type: Delete) { delete rootProject.buildDir}android { compileSdkVersion 23 buildToolsVersion '23.0.3'}dependencies {}
将其中的
android { compileSdkVersion 23 buildToolsVersion '23.0.3'}
删除或注释掉后重新编译通过。
问题二、android studio中文乱码各种情况的解决办法
Android Studio导入Eclipse的android项目java文件出现中文乱码,比如中文注释,中文提示等乱码,这一般是Eclipse中是gbk,到了Android Studio后默认utf-8格式打开的缘故。
1、注释中文出现乱码
解决方法:在 Android Studio 的设置菜单中找到修改编码的地方。如下:
File > Settings > Editor > File Encodings 里 Project Encoding 改为 GBK,为了统一规范,我也将其它 Encoding 项也设置为 GBK了。
2、用虚拟机运行应用时APP界面文字乱码。
解决办法:在Gradle Scripts -> build.gradle中的如下下图位置添加:
android{compileOptions.encoding=”GBK”}
即
注意,别加到project的bulid.gradle里去。
3、前两项做完之后关闭Android Studio重启运行乱码就会变成中文
阅读全文
0 0
- eclipse项目转到Android studio的步骤和问题
- 关于eclipse项目转到android studio的经验
- 将Eclipse的项目转到Android Studio上
- studio项目转到eclipse
- 从Eclipse转到Android studio的历程
- 从Eclipse转到Android Studio的注意事项
- 将一个Eclipse项目转到Intellij IDEA的步骤
- 将Eclipse项目转到Android Studio你所应该知道的
- 如何将eclipse的项目转到android studio中及其注意事项?
- 从eclipse转到Android Studio
- 从eclipse 转到android studio
- Eclipse转到Android studio里
- Android Studio导入Eclipse项目和一些常见的问题
- eclipse项目转android studio的问题
- Android Studio导入Eclipse项目操作步骤
- Eclipse项目转Android studio项目遇到的问题
- Android项目从Eclipse迁移到Android Studio的过程和一些问题汇总
- Android Studio导入Eclipse的Android项目问题的小结
- java抽象类与接口
- 分治算法
- ubuntu14.04安装mysql5.7.19
- java注解@interface
- 基于高德开放平台SDK的定位Demo
- eclipse项目转到Android studio的步骤和问题
- PHP ~(按位取反)位运算符
- codeforces round #441 B. Divisiblity of Differences
- PAT 1011. A+B和C (15)
- Java三大特性(封装,继承,多态)
- .Net内部缓存System.Web.Caching.Cache 和Redis缓存缓存工厂切换
- 设计模式四(工厂模式)
- 对梯度下降原理的理解
- 使用OKHttp模拟登陆知乎,兼谈OKHttp中Cookie的使用!