GithubHelp home page GithubHelp logo

Comments (11)

FloatFuture avatar FloatFuture commented on August 22, 2024 5

@zhumj @wangben5 @Bob-liuboyu @itxiaox @fjw0312 @Ou520 @ZhangKuixun @kingcxsc
Issuse:#610 AS3.2新建Module命名规则不能有 ‘.’ 等特殊符号

该问题已可以暂时解决

问题可能原因:

  • 在更新Android Studio3.2或者以上版本之后的新增Module模板增加了规范性的逻辑.
    (可将鼠标悬浮在旁边的?上查看详细这里不做描述)

解决思路

  • 教程在New Module时是通过Android Studio下的模板进行新建的,并且复现问题的时候也是通过New Module时是通过Android Studio下的模板进行新建;

    而我尝试将Sample内的例如:app.main使用Import module加载到我的项目中,是可以正常引用的,这样我猜测只是New Module的模板因为规范性才禁止使用".",并非其他做出限制.

解决方案:

  • 新增符合规范Module后更改Module name(⚠不可靠)

1.使用New Module并选择你需要的Module类型(类型如何选择请自行看Small文档,已经有详细说明)

为了说明情况,我举例子这里选择经常用的App.*插件模块名,在这里请选择:Phone & Tablet Module
之后请点击Next.

2.Configure the new module中

Application/Library name没有做出限制,按照你需要的填写即可,例如在这里我填写:App.main
Module name 这里模板做出了限制,建议使用Application/Library name的全小写并删除".",因为我上面Application/Library name是:App.main,所以这里我填写:appmain
之后的New Module配置继续按照Small文档说的进行即可

3.鼠标🖱右键刚刚新建的Module(例如我举例子的Module name为:appmain的Module)

选择Refactor>Rename(或Shift+F6重命名)
选择Rename module(⛔请勿选择其他选项!文件夹名称IDE会自动帮你修改),这里我们重命名就可以修改为:app.main了
点击OK

4.点击Make Project(绿色锤子)右边的Edit Configurations

点击原本的Module name,例如我这里是appmain
将上面的Name改为app.main

现在恭喜你🎉🎊已经成功将Module name修改成为Small能自动识别的了

5.在Terminal中

  • Windows中执行:gradlew small
  • Mac中执行:gradle small

看看是否出现我们的Module:

type name PP sdk aapt support file size
host app 30 30.0.0
app app.main 0x77 30 30.0.0

⚡BUILD SUCCESSFUL in 1s

如以上成功识别到我们重命名的app.main

**⚠不确定以后Android Studio对于Rename Module是否也同样使用规范检测逻辑,所以该方法不可靠,使用前请考虑清楚!⚠ **

(另外Small库已经没有维护较长时间了,新的Issuse也无原开发者回应,现在接入Kotlin还会出现 #608 集成失败的问题,需要更换较低版本的GradleTool和Gradle;如果作者仍未维护而你没有能力修改/维护该库建议更换其他仍有维护的项目,不推荐直接将该库使用到 生产环境)

编辑时间:2020/08/01 02:53
实验环境:Android Studio V4.0.1✅
FloatFuture
Author: FawnFuture
熬夜回复Issues不容易,如果帮到你请点个👍好吗😭

from small.

wangben5 avatar wangben5 commented on August 22, 2024

请问你解决了吗?我也遇到这样了,我android studio 3.4的,如果解决了,麻烦告知下,谢谢了

from small.

zhumj avatar zhumj commented on August 22, 2024

解决了,就是不用这个玩意

from small.

Bob-liuboyu avatar Bob-liuboyu commented on August 22, 2024

同求,一样无法创建。。。。

from small.

itxiaox avatar itxiaox commented on August 22, 2024

我的Android studio 3.5同样无法创建

from small.

fjw0312 avatar fjw0312 commented on August 22, 2024

哪位兄弟解决了???求告知

from small.

kingcxsc avatar kingcxsc commented on August 22, 2024

解决了,就是不用这个玩意

哈哈,笑出声

from small.

zhumj avatar zhumj commented on August 22, 2024

解决了,就是不用这个玩意

哈哈,笑出声

这玩意都已经没人维护了

from small.

Ou520 avatar Ou520 commented on August 22, 2024

哪位兄弟解决了???求告知

from small.

Ou520 avatar Ou520 commented on August 22, 2024

真的没办法解决吗?

from small.

ZhangKuixun avatar ZhangKuixun commented on August 22, 2024

哪位兄弟解决了???求告知

换一个吧,atlas

from small.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.